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/

	[[alternative HTML version deleted]]


