desctable (version 0.1.0)

stats_default: Functions to create a list of statistics to use in desctable

Description

These functions take a dataframe as argument and return a list of statistcs in the form accepted by desctable.

Usage

stats_default(data)

stats_normal(data)

stats_nonnormal(data)

stats_auto(data)

Arguments

data
The dataframe to apply the statistic to

Value

A list of statistics to use, potentially assessed from the dataframe

Details

Already defined are
  1. stats_default with length, mean/%, sd, med and IQR
  2. stats_normal with length, mean/% and sd
  3. stats_nonnormal with length, median/% and IQR
  4. stats_auto, which picks stats depending of the data

You can define your own automatic functions, as long as they take a dataframe as argument and return a list of functions or formulas defining conditions to use a stat function.