[R] Looking for knitr example for beginner (NO RStudio)

Simon Zehnder szehnder at uni-bonn.de
Thu Jul 18 22:50:35 CEST 2013


Hi Mike,

if you browse the folders, you find always the Rscript binary (the executable) under /Library/Frameworks/R.framework/Versions/.../Resources/Rscript. 

Do not forget to give your tex file the extension .Rnw! Then surround each Rcode with <<write here a name....add later further options (important one; results = 'asis')>>= Here your r code as you do it in the R shell .... at the end a @. Always inside the \begin{document} \end{document} tags.



Best

Simon

On Jul 18, 2013, at 10:22 PM, C W <tmrsg11 at gmail.com> wrote:

> Thanks, Simon.  I would never figured it out!
> 
> I apologize if I sound frustrated, because I am.
> 
> @package author: you have a great package, but I think a lot of the
> directions are hand waving.  For the newbies, this leads to more
> confusion.
> 
> @Berend: I am using OS X.
> 
> Mike
> 
> 
> On Thu, Jul 18, 2013 at 4:19 PM, Berend Hasselman <bhh at xs4all.nl> wrote:
>> 
>> On 18-07-2013, at 22:09, C W <tmrsg11 at gmail.com> wrote:
>> 
>>> http://tex.stackexchange.com/questions/85154/knitr-with-texworks/85165#85165
>>> 
>>> In step 3: "add the executable file (step 3)".
>>> 
>>> What is the executable file?  Locate package knitr directory path in R?
>>> 
>> 
>> From the window:  Executable ==> Program. So the executable is Rscript.exe.
>> 
>> 
>> Berend
>> 



More information about the R-help mailing list