kcf_sum: Descriptive statistics

View source: R/kcf_sum.R

kcf_sumR Documentation

Descriptive statistics

Description

Compute pre-selected set of descriptive statistics for provided vars, optionally by group. Speedboost via tidytable.

Usage

kcf_sum(data, sumvar, byvar = NULL)

Arguments

data

The data frame to summarize

sumvar

The variables to summarize; accommodates tidyselect helpers

byvar

The grouping variable for grouped summaries

Value

A data frame with descriptive stats: each var is a row; respective statistics are in column.

Examples

## Not run: 
kcf_sum(mtcars, c(mpg, disp)) # summary stats for mpg and disp
kcf_sum(mtcars, c(mpg, disp), c(am)) # summary stats for mpg and disp by am
kcf_sum(mtcars, where(is.numeric)) # summary stats for all numeric vars

## End(Not run)

kennchua/kctools documentation built on Aug. 28, 2024, 8:37 a.m.