delNArate: Compute and Delete NA Rate of Variable

Description Usage Arguments Details Value See Also Examples

Description

delNArate will compute NA rate of every variable in df firstly, then delete variables whose na rate is greater than or equal to threshold, return a list contains deleted dataframe.

Usage

1
delNArate(df, narate_critical = 0.9, exclude = NULL)

Arguments

df

A dataframe.

narate_critical

A numeric, Specifies NA rate threshold for selecting and returning variables, default 0.9.

exclude

Vector of column names or numbers to exclude, default NULL.

Details

the returned list contains three components, one is dataframe named 'naratedf', second is a dataframe named 'delVardf', last one is an after-deleted dataframe.

Value

A list

See Also

Other data preprocessing functions: delFewValues, delSinvalPercent, excludeCol, maxSinvalPercent

Examples

1
2
3
4
data(CreditData)
result1 <- delNArate(CreditData, narate_critical = 0.7)
result2 <- delNArate(CreditData, narate_critical = 0.7, exclude = "multiloantimes")
mysample <- result2[[3]]

xxzcool/scoremodel documentation built on May 4, 2019, 10:56 a.m.