tab_varlabs: Create a variable label dataframe

View source: R/tab_functions.R

tab_varlabsR Documentation

Create a variable label dataframe

Description

Create a variable label dataframe

Usage

tab_varlabs(df)

Arguments

df

Labelled dataframe, e.g., resulting of the read_sav / read_dta functions of the package haven.

Value

Dataframe consisting of two columns var and varlab, showing all variable labels in df.

Examples

# load spss data
path <- system.file("examples", "iris.sav", package = "haven")
df <- haven::read_sav(path)
attr(df$Sepal.Width, "label") <- "width of the sepal"
tab_varlabs(df)

urswilke/tablab documentation built on Oct. 17, 2022, 8:19 p.m.