View source: R/mmstat.attrVar.R
| mmstat.attrVar | R Documentation |
Returns the parameters for a variable. If type="numeric" then descriptive measures will be returned.
Otherwise absolute and relative frequencies will be returned. For using a subset of observation set index.
mmstat.attrVar(var, type, index = NULL)
var |
vector: values of a mmstat variable |
type |
character: type of values, allowed are |
index |
integer: observation numbers to use for computation, default is to use all observations |
descriptive measures
# make sure that no other data sets are loaded
mmstat.set(datasets=NULL)
mmstat.getDataNames(mmstat.rds("CARS"))
# summary of first numeric variable in first data set in mmstat
var <- mmstat.getVar(1, 1, 'numeric')
mmstat.attrVar(var, "numeric")
# summary of first factor variable in first data set in mmstat
var <- mmstat.getVar(1, 1, 'factor')
mmstat.attrVar(var, 'factor')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.