| confParser {StabPerf} | R Documentation |
Goes through a R formatted file and evaluates expressions found. Sets options globally and returns any blocks in {} as a list of expressions.
confParser(file=NULL, import=TRUE, run=FALSE, prefix="edaprakt")
file |
character. Name of file to be sourced. |
import |
logical. Should all expressions be evaluated in the global environment. |
run |
logical. Whether found expression (which are not in {}) should be run |
The configuration file consists of four types of objects:
<-
=
library(stats)
{ alpha(); beta(); }
If import is true assignments are evaluated in the global environment and options, after being prepended with prefix, are defined globally. If run is true, any expressions found are evaluated in the global environment immediately. Expressions with {} are never evaluated immediately and are always returned in a list.
blocks |
list. Blocks of code in {} that are ready to be sent to eval |
expressions <- confParser("file.conf", import=TRUE, run=TRUE, prefix="my")