IPDFileCheck (version 0.5.0)

returnSubgroupOmitNA: Function to return a subgroup when certain variable equals the given value while omitting those with NA

Description

Function to return a subgroup when certain variable equals the given value while omitting those with NA

Usage

returnSubgroupOmitNA(data, variable, value)

Arguments

data

data frame

variable

that corresponds to a column

value

a value that can be taken by the variable

Value

subgroup a data frame if success -1 if failure

Examples

Run this code
# NOT RUN {
returnSubgroupOmitNA(data.frame("age" = c(21,15), "Name" = c("John","Dora")),"age",10)
# }

Run the code above in your browser using DataCamp Workspace