printIf: printIf

View source: R/dataCheck.R

printIfR Documentation

printIf

Description

Prints the list of IDs meeting the specified condition

Usage

printIf(data, cond, text = "", threshold = NULL, varname = "id", na.rm = FALSE)

Arguments

data

A dataframe to look for condition

cond

A condition to check

text

The message to print (if empty the condition is used)

threshold

Cutoff number for ID reporting, as number

varname

Column name of ID to print

na.rm

Remove missing ID in the list to print, by default is False

Value

Message to print as list

Examples

df <- data.frame(ID = 1:4, Vaccs = c("pfizer"," ", "pfizer", "moderna"))
printIf(data = df, cond = Vaccs == "pfizer", threshold = 30, text = "Pfizer vaccin", varname = "ID")

Epiconcept-Paris/STRAP-epiuf documentation built on Aug. 5, 2024, 3:41 a.m.