| parametersFromFile {ramwas} | R Documentation |
The pipeline parameters can be stored in a simple file,
formatted as R code.
The parametersFromFile function transforms them into
a parameter list used by RaMWAS steps.
parametersFromFile(.parameterfile)
.parameterfile |
Name of the file with the parameters set as R variables. See the example below. |
Variables with names starting with period (.) are ignored.
Returns the list with all the variables set in the file.
The file .parameterfile is executed as R code,
so use only trusted parameter files.
Andrey A Shabalin andrey.shabalin@gmail.com
See vignettes: browseVignettes("ramwas").
filename = tempfile()
# Create a file with lines
# dirproject = "."
# modelcovariates = c("Age","Sex")
writeLines(
con = filename,
text = c(
"dirproject = \".\"",
"modelcovariates = c(\"Age\",\"Sex\")")
)
# Scan the file into a list
param = parametersFromFile(filename)
# Show the list
print(param)
file.remove(filename)