return_subgroup_withNA: Function to return a subgroup when certain variable equals...

View source: R/IPDFilecheck.R

return_subgroup_withNAR Documentation

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

return_subgroup_withNA(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 error if failure

Examples

return_subgroup_withNA(data.frame(
  "age" = c(21, 15),
  "Name" = c("John", "Dora")
), "age", 10)

sheejamk/IPDFileCheck documentation built on March 10, 2024, 3:14 p.m.