View source: R/config_miscwrappers.R
Rsh | R Documentation |
write bash and Rscript files for R code
Creates .sh (bash) and .R (Rscript) files given lines of R code held as a character string or character string vector, and optional arguments indicating which modules and packages to load. This function probably will not work on all systems.
Rsh(
name = "job",
Rcode,
modules = c("compiler/gcc/8.3", "gdal/3.0.0", "geos/3.7.2", "R/4.0"),
libPath = .libPaths()[1],
libs = c("misc.wrappers"),
dir = getwd()
)
name |
Character string with name of the job. Bash and Rscript files will have names 'name.sh' and 'name.R' |
Rcode |
Character string, possibly a vector, with lines of R code. Line breaks can be coded as \n. |
modules |
Character string vector with names of modules to load. The defaults are the current versions of programs needed to run misc.wrappers package on my system, and therefore these defaults will probably need to be changed for other systems. |
libPath |
Character string with path where R package libraries are held. Default is .libPaths()1 |
libs |
Character string vector with names of R packages to load. Default is 'misc.wrappers'. |
dir |
Character string with path to the directory where bash and Rscript files should be written. Default is the current directory. |
Character string with path to bash file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.