Description Usage Arguments Details Value Examples
Get or set stat types of columns on a data frame
1 2 |
col |
a column in a data frame |
value |
a single-element character vector |
In EDP, columns in a population have "stat types." Numeric columns are
usually "realAdditive" and "realMultiplicative". Factors are usually
"categorical." These functions get and set the stat type on a data frame you
will build a population from; you can also get the stat type of a column from
select
or simulate
.
a single-element character vector, NA
if no stat type was set
1 2 3 4 | d <- data.frame(x = c(1000, NA, 10000))
stat_type(d$x) <- "realMultiplicative"
st <- stat_type(d$x) # returns "realMultiplicative"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.