comp: comp >> Obsolete replaced by desc and desc by

View source: R/to_drop.R

compR Documentation

comp >> Obsolete replaced by desc and desc by

Description

Aim : To describe numeric variables or categorical variables (need to be in factor) according to an another variable

Usage

comp(vars, comp.var, labels, data)

Arguments

vars

list of vars you want to describe

comp.var

variable to compare (need to be data$var)

labels

labels for the list of vars

data

name of the dataset

Value

the result

Examples

data <- data.frame(Id = 1:4 , 
                    Vaccs = c("pfizer,moderna"," ", "pfizer", "moderna"),
                    Cov = 1,0,1,0)
vars <- c("Id", "Vaccs")
labels <- c("Id number", "Vaccination Brand")
## Not run: 
tab.comp1 <- comp(vars,data$Cov , labels, data) 

## End(Not run)

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