manageNotApplicable: Manage the not applicable condition into data.frame

Description Usage Arguments Value Examples

View source: R/statistic_functions.R

Description

Identify the not applicable char in data.frame and return clean list with : 1) data.frame without not applicable character, 2) list of logical vector identifying the row witch should contain data

Usage

1
manageNotApplicable(data, notApplicableChar = "NonApp")

Arguments

data

a data.frame containing data to clean

notApplicableChar

a character vector of length 1, with the not applicable character as in the data.frame

Value

a list of two elements : 1) data.frame without not applicable character, 2) list of logical vector identifying the row witch should contain data

Examples

1
2
3
4
5
data <- data.frame(X1 = c(1, 1, 0, 1, 1, 0, 1, 1, 1),
                   X2 = c(0, 0, "NC", 1, 1, "NC", 0, 0, 1))
resultNotApplicable <- manageNotApplicable(data, "NC")
data <- resultNotApplicable[[1]]
resultNotApplicable <- resultNotApplicable[[2]]

rgriffier/statsBordeaux documentation built on Aug. 11, 2021, 9:59 a.m.