[R] help
Mike Marchywka
marchywka at hotmail.com
Sun Apr 3 13:51:42 CEST 2011
> Date: Sun, 3 Apr 2011 01:35:16 +0530
> From: nandan.amar at gmail.com
> To: padmanabhan.vijayan at gmail.com
> CC: r-help at r-project.org
> Subject: Re: [R] help
>
> One way that u might have thought of is to create plot in PDF in R and the
> use pdftools.
> Additionally one can also think of running R script using R CMD and then
> using pdftools in a .sh script file if u r in linux.
> I am not aware of pdftools capability in R.
>
> On 2 April 2011 23:01, Vijayan Padmanabhan wrote:
>
> > Dear R Help group
> > I need to run a command line script from within R session. I am not clear
> > how i can acheive this. I tried shell and system function, but i am missing
> > something critical.can someone provide help?
> > My intention is to create a pdf file of a plot in R and then attach
> > existing files from my system as attachment into the newly created pdf
> > file.
> > Any help would be greatly appreciated.. Here is the command line script i
> > want to execute from within R.
> >
> >
> > pdftools -S "attachfiles=C:\test1.pdf" -i C:\test2.pdf -o C:\test4.pdf
> >
> > Regards
> > Vijayan Padmanabhan
I just tried
> system("pdftk --help")
and it appeared to work as I have pdftk from cygwin.I routinely do this the other way however and invoke
R from a bash script and then use external tools like this from the bash script
after R is done. If I'm generating various pieces, it seems to make sense
to get them all first and release any resources R has accumulated
as pdf manipulation itself can often require lots of memory etc.
More information about the R-help
mailing list