The R Project SVN R

Rev

Rev 68948 | Rev 72557 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 72093
Line 1... Line 1...
1
% File src/library/utils/man/Rscript.Rd
1
% File src/library/utils/man/Rscript.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2013 R Core Team
3
% Copyright 1995-2017 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{Rscript}
6
\name{Rscript}
7
\alias{Rscript}
7
\alias{Rscript}
8
\title{Scripting Front-End for R}
8
\title{Scripting Front-End for R}
Line 88... Line 88...
88
Rscript -e "date()" -e "format(Sys.time(), \\"\%a \%b \%d \%X \%Y\\")"
88
Rscript -e "date()" -e "format(Sys.time(), \\"\%a \%b \%d \%X \%Y\\")"
89
# in other shells, e.g. bash or tcsh, prefer
89
# in other shells, e.g. bash or tcsh, prefer
90
Rscript -e 'date()' -e 'format(Sys.time(), "\%a \%b \%d \%X \%Y")'
90
Rscript -e 'date()' -e 'format(Sys.time(), "\%a \%b \%d \%X \%Y")'
91
#endif
91
#endif
92
 
92
 
-
 
93
# Get the same initial packages in the same order as default R:
-
 
94
Rscript --default-packages=methods,datasets,utils,grDevices,graphics,stats -e 'sessionInfo()'
-
 
95
 
93
## example #! script for a Unix-alike
96
## example #! script for a Unix-alike
94
 
97
 
95
#! /path/to/Rscript --vanilla --default-packages=utils
98
#! /path/to/Rscript --vanilla --default-packages=utils
96
args <- commandArgs(TRUE)
99
args <- commandArgs(TRUE)
97
res <- try(install.packages(args))
100
res <- try(install.packages(args))