dtable: Generate descriptive frequencies and statistics tables

Description Usage Arguments Value Examples

Description

Simplifies the process and reduces the amount of code involved in generating descriptive frequencies and statistics tables by taking your entire dataset as input and generating the tables it predicts you would need given various variable aspects such as class.

Usage

1
2
dtable(data1, vars = NULL, frequencies = NULL, statistics = NULL,
  neat = TRUE, as.list = FALSE, sizesort = FALSE)

Arguments

data1

a data.frame or matrix

vars

select which columns of data1 to analyze

frequencies

select which columns to create frequencies tables for

statistics

select which columns to create statistics tables for

neat

logical, if TRUE returns rounded and formatted tables

as.list

logical, if TRUE it returns frequencies and statistics tables in a list format, split by variables

sizesort

logical, if TRUE returns data sorted by frequency and mean

Value

Returns descriptive frequencies and statistics tables for all variables in data1 by default. Predicts whether to create a frequencies table, statistics table, or both for each varible based on information gathered using dvariable.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Analyze all data
dtable(iris2)

#Analyze two or more variables
dtable(iris2, vars = c("Color", "Sold", "LikelyToBuy"))

# Analyze a single variable
dtable(iris2, vars = "Color")

# Return raw output
dtable(iris2, neat = FALSE)

# Return list output
dtable(iris2, as.list = TRUE)

# Frequencies sorted by size
dtable(iris2, sizesort = TRUE)

gitronald/demotables documentation built on May 17, 2019, 5:30 a.m.