New answers tagged

2

Figured it out, need to set the options used in the R session: <<customOptions,echo=FALSE,eval=TRUE>>= options(prompt = "R> ", continue = "+ ") @


1

Posting this is an answer which is similar to above because this will work for mac and (probably) on other linux based systems. I use OS X El Capitan (mac), and the approach is kind of same. After installing "knitr" package, the user command can be defined as R -e "knitr::knit2pdf('%.Rnw')" | txs:///pdflatex | txs:///view-pdf-internal This works ...


2

Sweave processes the source file by ignoring all LaTeX code and executing the R code. This means that code in a LaTeX loop will be executed only once by R. In the generated .tex code any \Sexpr variables are substituted by the value after the single run, in this case \Sexpr{x} is replaced by the string 2. When running LaTeX afterwards, the loop is executed ...



Top 50 recent answers are included