table_summary {grafify}R Documentation

Get numeric summary grouped by factors

Description

This is a wrapper around aggregate function in base R to obtain mean, median, standard deviation and count for quantitative variable(s) grouped by one or more factors. More than one column containing of quantitative variables can be passed on, and summaries for each is provided with column names with a ..

Usage

table_summary(data, Ycol, ByGroup)

Arguments

data

name of the data table.

Ycol

name of one column (in quotes) or a vector of column names containing the numerical variable to be summarised.

ByGroup

name of one column (in quotes) or a vector of column names containing the grouping factors

Value

this function takes in a data.frame or tibble and returns a data.frame or tibble.

Examples

table_summary(Ycol = "cty",
ByGroup = c("fl", "drv"),
data = mpg)


[Package grafify version 4.0.1 Index]