lset | R Documentation |
Sets a (special) variable, similar to lunaC command-line options
lset(var, val = NULL)
var |
a required parameter that is either a
variable name
(if |
val |
if |
The special variables sig
and alias
operate slightly differently with lset()
,
in that new values are appended to the list, rather than over-writing the existing value.
> lset("sig", "C3") > lset("sig", "C4")
is the same as
> lset("sig", "C3, C4")
To reset any variable (including sig
and alias
)
> lset("sig", ".")
the lreset()
function clears all variables, and resets all
special variables to their default values.
## Not run:
## these are equivalent
## % luna s.lst stage=N2 excl=arousal_standard sig=C3,C4 < cmd.txt
> lset("stage", "N2")
> lset("excl", "arousal_standard")
> lset("sig", "C3, C4")
> k <- leval(lcmd("cmd.txt"))
> lset(list(stage="N2", excl="arousal_standard", sig="C3, C4"))
## if these variables are specified in a file
> lset("files/param.txt")#'
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.