printIf2: printIf2

View source: R/dataCheck.R

printIf2R Documentation

printIf2

Description

Prints the list of IDs meeting the specified condition

Usage

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

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

data_old

A dataset where to look for previously checked values

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.