Learn R Programming

edpclient (version 0.5.1)

stat_type: Stat Types

Description

Get or set stat types of columns on a data frame

Usage

stat_type(col)
stat_type(col) <- value

Arguments

col

a column in a data frame

value

a single-element character vector

Value

a single-element character vector, NA if no stat type was set

Details

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.

Examples

Run this code
# NOT RUN {
  d <- data.frame(x = c(1000, NA, 10000))
  stat_type(d$x) <- "realMultiplicative"
  st <- stat_type(d$x)  # returns "realMultiplicative"
  
# }

Run the code above in your browser using DataLab