listVar: listVar

View source: R/utils.R

listVarR Documentation

listVar

Description

listVar

Usage

listVar(dataset, pattern, regex = FALSE, strict = FALSE)

Arguments

dataset

A dataset to explore

pattern

Pattern representing varname

regex

Should the pattern be used as regex expression or use classical "joker" ? and *

strict

If FALSE, the default, look for any column name containing the pattern

Value

list of the variables matching the pattern

Examples

data <- data.frame(Id = 1:4 ,
                   vaccage = c(34,45, 50,22 ),
                   symp = c("Y","Y","N","N"),
                   vaccboost=c("N","Y","N","Y"))
listVar(data,"symp")
listVar(data,"vac*")



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