parametersFromFile {ramwas} | R Documentation

## Scan Parameters From a R Code File

### Description

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.

### Usage

    parametersFromFile(.parameterfile)

### Arguments

`.parameterfile` | Name of the file with the parameters set as R variables. See the example below.

### Details

Variables with names starting with period (.) are ignored.

### Value

Returns the list with all the variables set in the file.

### Note

The file `.parameterfile` is executed as R code, so use only trusted parameter files.

### Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

### See Also

See vignettes: `browseVignettes("ramwas")`.

### Examples

    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)

[Package ramwas version 1.18.0 Index]