Dear List,
Does anybody know a better way to run the demo code in users guide of
each package? What I am doing now is copying each line into R to see
the results.
--
Xiaoling
Shirley,
If the vignette was written in a Sweave format, which it should have
been, the Stangle function from the tools package and the Stangle
command from R CMD will create an R script that you can source or
execute line by line. See
library(tools)
help(Stangle)
from within R or
R CMD Stangle --help
from the OS command prompt for more information.
Patrick
shirley zhang wrote:
> Dear List,
>
> Does anybody know a better way to run the demo code in users guide
of
> each package? What I am doing now is copying each line into R to see
> the results.
>
>
Hi Shirley,
On May 4, 2009, at 12:11 PM, shirley zhang wrote:
> Dear List,
>
> Does anybody know a better way to run the demo code in users guide
of
> each package? What I am doing now is copying each line into R to see
> the results.
Use the `example` function.
So, say I'd like to run the example code listed at the bottom of the
`lapply` help page, I'd simply type:
R> example(lapply)
-steve
--
Steve Lianoglou
Graduate Student: Physiology, Biophysics and Systems Biology
Weill Medical College of Cornell University
http://cbio.mskcc.org/~lianos
Hi Shirley,
try ?demo and ?example
HTH.
J.
shirley zhang wrote:
> Dear List,
>
> Does anybody know a better way to run the demo code in users guide
of
> each package? What I am doing now is copying each line into R to see
> the results.
>