setArgs | R Documentation |
A function that collects and stores various arguments that can be used as
inputs to other functions. The setArgs
function comes with default parameter
values for the arguments. The user is asked to check these values and understand how
these will affect the data.
setArgs(
Years = c(2000:2025),
Age = list(All = c(0, 100)),
AgeCat = NULL,
AgeBy = 5,
nSim = 1,
imputeMethod = imputeRandomPoint,
aname = "filename",
mcores = 1,
setFun = identity,
addVars = identity,
MoreArgs = NULL
)
Years |
numeric vector of years. |
Age |
list of ages as in |
AgeCat |
numeric vector of age categories, e.g. |
AgeBy |
integer value for size age categories. |
nSim |
number of simulations to perform. |
imputeMethod |
select either |
aname |
String to name an object or set a filename. |
mcores |
number of cores to use for parallel package (used in
|
setFun |
a function used by |
addVars |
a function used by |
MoreArgs |
a list, which adds more arguments if needed. |
list
# Check default parameter values
Args = setArgs()
Args
# Set specific age and year ranges
Args <- setArgs(Years=c(2008:2018), Age=list(Mal=c(15, 54), Fem=c(15, 49)))
setHIV(Args)
# Keep all ages
ArgsEpi <- setArgs(Age=list(All=c(0, 100)), AgeCat=seq(0, 100, 20))
setEpisodes(ArgsEpi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.