Re: [knitr] Rtangle for knitr

140 views
Skip to first unread message

Carl Boettiger

unread,
Jul 5, 2012, 6:51:57 PM7/5/12
to LuciaLam, knitr
Hi Lucia,

I believe 

knit("myscript.Rnw", tangle=TRUE)

will generate myscript.R with just the R code.  


On Thu, Jul 5, 2012 at 2:57 PM, LuciaLam <lucia...@gmail.com> wrote:
Hi all,
I might have just missed this somewhere, but is there a Rtangle function for knitr? It allows the extraction of just the R code from a .Rnw file.
Thanks in advance for any pointers!
Cheers,
Lucia



--
Carl Boettiger
UC Davis
http://www.carlboettiger.info/

Yihui Xie

unread,
Jul 5, 2012, 7:03:55 PM7/5/12
to Carl Boettiger, LuciaLam, knitr
or purl('myscript.Rnw') for short

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

Lucia Lam

unread,
Jul 5, 2012, 8:11:21 PM7/5/12
to Yihui Xie, Carl Boettiger, knitr
Thanks so much! Right....  purl = opposite of knit, makes sense :)

Regards,
Lucia
Reply all
Reply to author
Forward
0 new messages