An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130110/8e0017e8/attachment-0001.pl>
help with knit_hooks
2 messages · Francesco Sarracino, Yihui Xie
This is the only public reference at the moment: http://yihui.name/knitr/hooks (which has explained why your hook does not work) Or learn by examples: https://github.com/yihui/knitr-examples (e.g. example 045) Or in the spirit of "Luke, use the source!", see https://github.com/yihui/knitr Regards, Yihui -- Yihui Xie <xieyihui at gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Jan 10, 2013 at 6:51 AM, Francesco Sarracino
<f.sarracino at gmail.com> wrote:
Dear R-listers,
does anybody can suggest some manual where I can learn more about how the
hooks in knitr work?
I am trying to enclose the output of an R command in the Latex verbatim
environment.
I defined a hook as follows:
knit_hooks$set(fsverb = function(x, options) {
paste("\\begin(verbatim)\n", x, "\\end(verbatim)\n", sep = "")
}
then I set a chunk as follows:
<<expl-emp, echo = TRUE, results = 'asis', fsverb = TRUE>>=
names(data)
@
but when I compile, I get a message of error saying that the compiler (in R
studio) is quitting from lines ...
I know that this is my fault because I don't know how to properly use the
hooks, therefore I am asking if anybody can advice a reference where I can
understand how the hooks and their options work and how to set them.
Thanks in advance for your kind help,
f.
--
Francesco Sarracino, Ph.D.
https://sites.google.com/site/fsarracino/