pmut.base.find: Obtain Meta Information for Each Column

Description Usage Arguments Value Examples

View source: R/pmut.base.find.R

Description

This function finds the meta information for each column within training data, which will be used to process testing and/or new data so that it can be scored without error, check pmut.base.prep for the part of testing data processing. Meta information for columns of class factor, character, and logical will be stored in one list. Each element of the list contains three slots: 1st $VarString is column name, 2nd $LvlVec is vector of unique levels, 3rd $LvlBase is base level name which is the level with most counts. Meta information for columns of class integer, and numeric will be stored in another list. Each element of the list contains two slots: 1st $VarString is column name, 2nd $ValueMean is its value mean (median for integer).

Usage

1

Arguments

DATA

Object of class data.frame or data.table

Value

A list of two elements, 1st being meta information for categorical columns, 2nd for numeric columns

Examples

1
2
3
temp = pmut.base.find(data.frame(ggplot2::diamonds))
temp[[1]]  # categorical meta
temp[[2]]  # numeric meta

chengjunhou/pmut documentation built on May 23, 2019, 4:24 p.m.