Learn R Programming

SciencesPo (version 1.3.9)

tabstat: Table With Summary Statistics

Description

Generates a table with summary statistics.

Usage

tabstat(.data, var, by = NULL, statistics = c("nnmiss", "mean", "sd"))

## S3 method for class 'default': tabstat(.data, var, by = NULL, statistics = c("nnmiss", "mean", "sd"))

Arguments

.data
The data.frame names.
var
The name of variable or column.
by
The name of grouping variable.
statistics
The name of desired statistics.

Examples

Run this code
tab = tabstat(Presidents, c("winner.height", "winner.vote", "turnout"))
# knitr::kable(tab, digits=2)

Run the code above in your browser using DataLab