Learn R Programming

expss (version 0.11.4)

info: Provides variables description for dataset

Description

info returns data.frame with variables description and some summary statistics. Resulting data.frame mainly intended to keep in front of eyes in RStudio viewer or to be saved as csv to view in the spreadsheet software as reference about working dataset.

Usage

info(x, stats = TRUE, frequencies = TRUE, max_levels = 10)

Value

data.frame with following columns: Name, Class, Length, NotNA, NA, Distincts, Label, ValueLabels, Min., 1st Qu., Median, Mean, 3rd Qu., Max., Frequency.

Arguments

x

vector/factor/list/data.frame.

stats

Logical. Should we calculate summary for each variable?

frequencies

Logical. Should we calculate frequencies for each variable? This calculation can take significant amount of time for large datasets.

max_levels

Numeric. Maximum levels for using in frequency calculations. Levels above this value will convert to 'Other values'.

Examples

Run this code
data(mtcars)
var_lab(mtcars$am) = "Transmission"
val_lab(mtcars$am) = c("Automatic"=0, "Manual"=1)
info(mtcars, max_levels = 5)                             

Run the code above in your browser using DataLab