Learn R Programming

dtables (version 0.2.0)

dft: Create a data.frame table (dft)

Description

Create a descriptive frequencies table with descriptive statistics by group.

Usage

dft(data1, prop = TRUE, perc = TRUE, by = NULL, neat = TRUE, digits = 2)

Arguments

data1
a vector or data.frame column
prop
logical, if TRUE returns an additional proportion column
perc
logical, if TRUE returns an additional percentage column
by
numeric variable to return descriptive statistics for
neat
logical, if TRUE returns a tailored dataset
digits
integer, number of digits to round to

Value

a data.frame table with optional proportion, percentage, and descriptive statistics columns

Examples

Run this code
dft(iris2$Species)
dft(iris2$Species, by = iris2$Sepal.Length)

Run the code above in your browser using DataLab