[R] How to execute a R script but outputting the result to the screen?

Peng Yu pengyu.ut at gmail.com
Thu Aug 6 21:22:51 CEST 2009


Is there a command line option for me to figure out what R version
Rscript calls?

On Aug 6, 10:23 am, Gabor Grothendieck <ggrothendi... at gmail.com>
wrote:
> Try:
>
> Rscript -e R.version.string
>
> to get the R version, or
>
> Rscript --version
>
> if you want to know the version of Rscipt itself rather than R.
>
>
>
> On Thu, Aug 6, 2009 at 11:18 AM, Peng Yu<pengyu... at gmail.com> wrote:
> > I didn't know that OS matters. My machine is a linux machine.
>
> > I have a few different version of R installed in my machine (different
> > commands like R, R-2.9.0, R-2.8 ..). But I don't see the version of
> > Rscript. How to figure out which version of R my Rscript uses?
>
> > Regards,
> > Peng
>
> > On Thu, Aug 6, 2009 at 9:45 AM, Erik Iverson<eiver... at nmdp.org> wrote:
> >> You did not specify your OS, but you might try at the shell prompt:
>
> >> Rscript file.R
>
> >> See ?Rscript
>
> >> -----Original Message-----
> >> From: r-help-boun... at r-project.org [mailto:r-help-boun... at r-project.org] On Behalf Of Peng Yu
> >> Sent: Thursday, August 06, 2009 9:35 AM
> >> To: r-h... at stat.math.ethz.ch
> >> Subject: [R] How to execute a R script but outputting the result to the screen?
>
> >> Hi,
>
> >> If I run the below command, it will generate a file 'file.Rout' to
> >> save the output. But I want the output be shown in the screen
> >> directly. I'm wondering if there is a direct way to do so.
>
> >> R CMD BATCH file.R
>
> >> Regards,
> >> Peng
>
> >> ______________________________________________
> >> R-h... at r-project.org mailing list
> >>https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
>
> > ______________________________________________
> > R-h... at r-project.org mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list