Hello all, I wrote a bash script in Mac OS that takes my .rnw file, knit it and then makes a .pdf. To knit my file, I'm using the command
Rscript -e "library(knitr); knit('file.rnw', encoding='utf8')" and everything works fine. However, I don't want the ## characters in my final document. I tested, using R prompt, the following commands library(knitr) opts_chunk$set(comment=NA) knit('file.rnw', encoding='utf8') and they give me exactly what I want: the document without comments in the R commands output. But if I try to run Rscript -e "library(knitr); opts_chunk$set(comment=NA); knit('livro.rnw', encoding='utf8')" I get Error: could not find function "opts_chunk" Execution halted as result. What am I doing wrong? How can I ask for options for my chunk in knitr using the command line? Thanks, -- Marcus Nunes marcus.nu...@gmail.com http://marcusnunes.me/ [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.