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