printIf | R Documentation |
Prints the list of IDs meeting the specified condition
printIf(data, cond, text = "", threshold = NULL, varname = "id", na.rm = FALSE)
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 |
Message to print as list
df <- data.frame(ID = 1:4, Vaccs = c("pfizer"," ", "pfizer", "moderna"))
printIf(data = df, cond = Vaccs == "pfizer", threshold = 30, text = "Pfizer vaccin", varname = "ID")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.