The text file should be organized as follows 1. Any text after a comment symbol # will be ignored 2. Control parameter names should be on their own line 3. Parameter values should be on the following line. If multiple parameter values are needed they should be separated by white space but on the same line

readControlFile(fileName, parmNames)

Arguments

fileName

The name of the text file to be read. Must include the path to the file

parmNames

A string vector with the names of the control parameters that will be searched in the text file

Value

A named list of the parameter values read from the control file

Details

Call this function before beginning the simulation

Examples

params <- readControlFile("./inputDir/ctrlFile.txt", c("nStages", "nParents", "nCrosses"))
#> Warning: cannot open file './inputDir/ctrlFile.txt': No such file or directory
#> Error in file(con, "r"): cannot open the connection