Function to return a subgroup when certain variable equals the given value while omitting those with NA
returnSubgroupOmitNA(data, variable, value)
data frame
that corresponds to a column
a value that can be taken by the variable
subgroup a data frame if success -1 if failure
# NOT RUN { returnSubgroupOmitNA(data.frame("age" = c(21,15), "Name" = c("John","Dora")),"age",10) # }
Run the code above in your browser using DataLab