Open gragusa opened 8 years ago
See the Hmisc package knitrSet function. As I haven't had this particular problem I suspect one of the default options used by knitrSet solved it.
Frank
On 12/04/2015 08:27 AM, Giuseppe Ragusa wrote:
I use |latex| to create complex tables using knitr. However, |latex| generated tables have the |call| added to the table's output by default as a comment. This is problematic because |knitr| sanitizes the comment marker |%| and thus the call is added as a test before the table.
This PR add a flag |output.call| (default value is |FALSE|) which excludes the problematic output.
You can view, comment on, or merge this pull request online at:
https://github.com/harrelfe/Hmisc/pull/33
Commit Summary
Added to
File Changes
M R/latex.s https://github.com/harrelfe/Hmisc/pull/33/files#diff-0 (289)
Patch Links:
- https://github.com/harrelfe/Hmisc/pull/33.patch
- https://github.com/harrelfe/Hmisc/pull/33.diff
— Reply to this email directly or view it on GitHub https://github.com/harrelfe/Hmisc/pull/33.
Frank E Harrell Jr Professor and Chairman School of Medicine
Department of *Biostatistics* *Vanderbilt University*
The problem is there with markdown
and not with latex literate file. The reason is that %
does not initiate a comment in markdown.
I have changed the output.call
to comment = TRUE
which leave things as they were before this PR. When comment=FALSE
the comment with the call output is not shown.
Please state which function you are referring to and what PR means. I use knitr extensively and have never had a problem with this so please provide a trivial self-contained example that fails when running knitr to produce a .tex file.
Giuseppe has created a pull request (PR). He modified latex.default
by adding a new argument, comment=TRUE
. See the "Files Changed" tab at the top of this discussion (or https://github.com/harrelfe/Hmisc/pull/33/files).
I'm sorry that I've waiting so long to merge your pull request that there are now conflicts in the code. Would you mind re-doing the pull request on the latest version of Hmisc on github, and also making corresponding changes in the help file? Thanks for your efforts. -Frank
I use
latex
to create complex tables using knitr. However,latex
generated tables have thecall
added to the table's output by default as a comment. This is problematic becauseknitr
sanitizes the comment marker%
and thus the call is added as a test before the table.This PR add a flag
output.call
(default value isFALSE
) which excludes the problematic output.