tab_types: Tabulate the variables' types in a dataframe

View source: R/tab_functions.R

tab_typesR Documentation

Tabulate the variables' types in a dataframe

Description

First unattr() is being called on df. This should result in a dataframe of only two types: numeric or character without attributes. These 2 types are then returned.

Usage

tab_types(df)

Arguments

df

A dataframe.

Value

A dataframe consisting of 2 columns: The variable and its type.

Examples

df <- data.frame(fbnr = 1:10,
                 sex = c(2, 1, 2, 1, 1, 2, 2, 1, 2, 1),
                 age = c("24", "23", "23", "41", "23", "39", "30", "18", "31", "48"))
tab_types(df)

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