R Programming - gizotso/R GitHub Wiki
source("Mybirds.R")
Si l’utilisateur veut que ses fonctions soient chargées au démarrage de R, il peut les enregistrer dans un workspace .RData qui sera chargé en mémoire s’il est localisé dans le répertoire de travail de démarrage. Une autre possibilité est de configurer le fichier ‘.Rprofile’ ou ‘Rprofile’ (voir ?Startup pour les détails). Enfin, il est possible de créer un package mais ceci ne sera pas abord´e ici (on se reportera au manuel “Writing R Extensions”)
Running R from the Cmd line
R -e
R -e install.packages(c("package1", "package2")) # install to default location.
R -e print('hello')
R <
R < scriptName.R --no-save
R CMD BATCH (deprecated)
R CMD BATCH your_r_script.R
Rscript
Rscript : Rscript [options] [-e expr [-e expr2 ...] | file] [args]
Batch file
Rscript.exe install_packages.R
pause
-
http://stackoverflow.com/questions/18306362/run-r-script-from-command-line :
Rscript a.R -
- R CMD BATCH, Rscript, littler plackage
-
http://stat.ethz.ch/R-manual/R-devel/library/utils/html/Rscript.html
-
http://www.statmethods.net/interface/batch.html :
CMD BATCH --vanilla --slave "c:\my projects\my_script.R" -
http://blog.revolutionanalytics.com/2009/06/running-scripts-with-r-cmd-batch.html
CMD BATCH myscript.R myscript.Rout
Making R scripts executable : http://www.r-datacollection.com/blog/Making-R-files-executable/
Source all R files from one folder dynamically
- http://stackoverflow.com/questions/10291520/reading-all-scripts-and-data-files-from-multiple-folders
- http://stackoverflow.com/questions/26045478/source-r-scripts-in-different-folders
- http://adv-r.had.co.nz/Data-structures.html
see also devtools or other util packages