{"action":"created","issue":{"url":"https://api.github.com/repos/Rapporter/pander/issues/162","labels_url":"https://api.github.com/repos/Rapporter/pander/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/Rapporter/pander/issues/162/comments","events_url":"https://api.github.com/repos/Rapporter/pander/issues/162/events","html_url":"https://github.com/Rapporter/pander/issues/162","id":69432917,"number":162,"title":"Bug: Cannot Highlight/Emphasize Row and Columns in the same way at the same time","user":{"login":"iamovrhere","id":7682668,"avatar_url":"https://avatars.githubusercontent.com/u/7682668?v=3","gravatar_id":"","url":"https://api.github.com/users/iamovrhere","html_url":"https://github.com/iamovrhere","followers_url":"https://api.github.com/users/iamovrhere/followers","following_url":"https://api.github.com/users/iamovrhere/following{/other_user}","gists_url":"https://api.github.com/users/iamovrhere/gists{/gist_id}","starred_url":"https://api.github.com/users/iamovrhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamovrhere/subscriptions","organizations_url":"https://api.github.com/users/iamovrhere/orgs","repos_url":"https://api.github.com/users/iamovrhere/repos","events_url":"https://api.github.com/users/iamovrhere/events{/privacy}","received_events_url":"https://api.github.com/users/iamovrhere/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-19T15:01:31Z","updated_at":"2015-04-19T18:42:31Z","closed_at":null,"body":"Running:\r\n````\r\nversion.string R version 3.1.3 (2015-03-09)\r\nnickname       Smooth Sidewalk\r\npander version 0.5.1\r\n````\r\n\r\nI seem to be experiencing an issue with emphasizing rows and columns at the same time, but only the same way. \r\n\r\nIf either:\r\n\r\n* Both `emphasize.cols(x)` AND `emphasize.rows(x)`  (or their arguments)\r\n* Both `emphasize.strong.cols(x)` AND `emphasize.strong.rows(x)` (or their arguments)\r\n\r\nare used concurrently, I consistently get: \r\n`Error in pandoc.table.return(...) : \r\n  Wrong number of parameters (%s instead of *%s*) passed: justify`\r\n\r\nSuch that:\r\n\r\n````\r\n> A <- sample(c(\"Y\", \"M\", \"N\"), 100, replace = TRUE)\r\n> B <- sample(c(\"X\", \"Y\"), 100, replace = TRUE)\r\n> foo <- data.frame(A, B)\r\n> emphasize.strong.cols(1);\r\n> emphasize.rows(1);\r\n> emphasize.strong.rows(1);\r\n> pandoc.table(table(foo)); \r\nError in pandoc.table.return(...) : \r\n  Wrong number of parameters (3 instead of *6*) passed: justify\r\n````\r\n\r\nSimilarly:\r\n\r\n````\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.strong.rows = 1 ); \r\nError in pandoc.table.return(...) : \r\n  Wrong number of parameters (3 instead of *6*) passed: justify\r\n> pandoc.table(table(foo), emphasize.cols = 1, emphasize.rows = 1 ); \r\nError in pandoc.table.return(...) : \r\n  Wrong number of parameters (3 instead of *6*) passed: justify\r\n````\r\n\r\nHowever if I only mix **strong** and *regular emphasis*, \r\n\r\n````\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.rows = 1 ); \r\n---------------------\r\n&nbsp;     X      Y  \r\n------- -------- ----\r\n **M**  ***16*** *25*\r\n\r\n **N**   **16**   12 \r\n\r\n **Y**   **14**   17 \r\n---------------------\r\n````\r\nIt works, somehow.\r\n\r\n\r\nIf I manually try to set justify with the emphasis:\r\n````\r\n> #Set with 3 lefts\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.strong.rows = 1, justify = c(\"left\", \"left\", \"left\")); \r\nError in pandoc.table.return(...) : \r\n  Wrong number of parameters (3 instead of *6*) passed: justify\r\n> #Set with 6 lefts. (Which if I understand correctly, is the wrong way)\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.strong.rows = 1, justify = c(\"left\", \"left\", \"left\", \"left\", \"left\", \"left\")); \r\n\r\n-------------- ------ ------ ------ -- --\r\nlist(\"**16**\") **16** **14** **25** 12 17\r\n-------------- ------ ------ ------ -- --\r\n````\r\nI still cannot seem to get the correct output.\r\n\r\nThank you for your time. \r\n\r\n---\r\n\r\nEdit:\r\n\r\nI should also mention that `emphasize.strong.cols` seems to fail uniquely as an argument: \r\n\r\n````\r\n> pandoc.table(table(foo), emphasize.cols = 1, emphasize.strong.rows = 1, emphasize.strong.cols = 1 ); \r\nError in t[, emphasize.strong.cols, drop = FALSE] : \r\n  incorrect number of dimensions\r\n> pandoc.table(table(foo), emphasize.rows = 1, emphasize.cols = 1, emphasize.strong.cols = 1 ); \r\nError in t[, emphasize.strong.cols, drop = FALSE] : \r\n  incorrect number of dimensions\r\n> pandoc.table(table(foo), emphasize.rows = 1, emphasize.cols = 1, emphasize.strong.rows = 1 ); \r\nError in pandoc.table.return(...) : \r\n  Wrong number of parameters (3 instead of *6*) passed: justify\r\n````"},"comment":{"url":"https://api.github.com/repos/Rapporter/pander/issues/comments/94304456","html_url":"https://github.com/Rapporter/pander/issues/162#issuecomment-94304456","issue_url":"https://api.github.com/repos/Rapporter/pander/issues/162","id":94304456,"user":{"login":"daroczig","id":495736,"avatar_url":"https://avatars.githubusercontent.com/u/495736?v=3","gravatar_id":"","url":"https://api.github.com/users/daroczig","html_url":"https://github.com/daroczig","followers_url":"https://api.github.com/users/daroczig/followers","following_url":"https://api.github.com/users/daroczig/following{/other_user}","gists_url":"https://api.github.com/users/daroczig/gists{/gist_id}","starred_url":"https://api.github.com/users/daroczig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daroczig/subscriptions","organizations_url":"https://api.github.com/users/daroczig/orgs","repos_url":"https://api.github.com/users/daroczig/repos","events_url":"https://api.github.com/users/daroczig/events{/privacy}","received_events_url":"https://api.github.com/users/daroczig/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T18:42:31Z","updated_at":"2015-04-19T18:42:31Z","body":"I'm just about to push an update to CRAN, but before that, can you please verify that these are working fine with the dev version (after installing from GH):\r\n\r\n```r\r\n> sessionInfo()\r\nR version 3.1.3 (2015-03-09)\r\nPlatform: x86_64-unknown-linux-gnu (64-bit)\r\nRunning under: Arch Linux\r\n\r\nlocale:\r\n [1] LC_CTYPE=hu_HU.utf8       LC_NUMERIC=C             \r\n [3] LC_TIME=en_US.UTF-8       LC_COLLATE=en_US.UTF-8   \r\n [5] LC_MONETARY=en_US.UTF-8   LC_MESSAGES=hu_HU.utf8   \r\n [7] LC_PAPER=hu_HU.utf8       LC_NAME=C                \r\n [9] LC_ADDRESS=C              LC_TELEPHONE=C           \r\n[11] LC_MEASUREMENT=hu_HU.utf8 LC_IDENTIFICATION=C      \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n[1] pander_0.5.2\r\n\r\nloaded via a namespace (and not attached):\r\n[1] digest_0.6.8 Rcpp_0.11.5  tools_3.1.3 \r\n> A <- sample(c(\"Y\", \"M\", \"N\"), 100, replace = TRUE)\r\n> B <- sample(c(\"X\", \"Y\"), 100, replace = TRUE)\r\n> foo <- data.frame(A, B)\r\n> emphasize.strong.cols(1);\r\n> emphasize.rows(1);\r\n> emphasize.strong.rows(1);\r\n> pandoc.table(table(foo)); \r\n\r\n-------------------------\r\n&nbsp;     X        Y    \r\n------- -------- --------\r\n **M**  ***20*** ***12***\r\n\r\n **N**   **19**     18   \r\n\r\n **Y**   **15**     16   \r\n-------------------------\r\n\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.strong.rows = 1 ); \r\n\r\n---------------------\r\n&nbsp;    X      Y   \r\n------- ------ ------\r\n **M**  **20** **12**\r\n\r\n **N**  **19**   18  \r\n\r\n **Y**  **15**   16  \r\n---------------------\r\n\r\n> pandoc.table(table(foo), emphasize.cols = 1, emphasize.rows = 1 ); \r\n\r\n-----------------\r\n&nbsp;   X    Y  \r\n------- ---- ----\r\n **M**  *20* *12*\r\n\r\n **N**  *19*  18 \r\n\r\n **Y**  *15*  16 \r\n-----------------\r\n\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.rows = 1 ); \r\n\r\n---------------------\r\n&nbsp;     X      Y  \r\n------- -------- ----\r\n **M**  ***20*** *12*\r\n\r\n **N**   **19**   18 \r\n\r\n **Y**   **15**   16 \r\n---------------------\r\n\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.strong.rows = 1, justify = c(\"left\", \"left\", \"left\")); \r\n\r\n---------------------\r\n&nbsp;  X      Y     \r\n------- ------ ------\r\n**M**   **20** **12**\r\n\r\n**N**   **19** 18    \r\n\r\n**Y**   **15** 16    \r\n---------------------\r\n\r\n> pandoc.table(table(foo), emphasize.strong.cols = 1, emphasize.strong.rows = 1, justify = c(\"left\", \"left\", \"left\", \"left\", \"left\", \"left\")); \r\nError in pandoc.table.return(...) : \r\n  Wrong number of parameters (6 instead of *3*) passed: justify\r\n> pandoc.table(table(foo), emphasize.cols = 1, emphasize.strong.rows = 1, emphasize.strong.cols = 1 ); \r\n\r\n-----------------------\r\n&nbsp;     X       Y   \r\n------- -------- ------\r\n **M**   **20**  **12**\r\n\r\n **N**  ***19***   18  \r\n\r\n **Y**  ***15***   16  \r\n-----------------------\r\n\r\n> pandoc.table(table(foo), emphasize.rows = 1, emphasize.cols = 1, emphasize.strong.cols = 1 ); \r\n\r\n---------------------\r\n&nbsp;     X      Y  \r\n------- -------- ----\r\n **M**  ***20*** *12*\r\n\r\n **N**  ***19***  18 \r\n\r\n **Y**  ***15***  16 \r\n---------------------\r\n\r\n>  pandoc.table(table(foo), emphasize.rows = 1, emphasize.cols = 1, emphasize.strong.rows = 1 ); \r\n\r\n-------------------------\r\n&nbsp;     X        Y    \r\n------- -------- --------\r\n **M**  ***20*** ***12***\r\n\r\n **N**    *19*      18   \r\n\r\n **Y**    *15*      16   \r\n-------------------------\r\n```"}}