KH.nineNumbers.by: Produce table of nine-numbers grouped by a given column in...

Description Usage Arguments Details See Also Examples

View source: R/Stats.R

Description

Produce table of nine-numbers grouped by a given column in the data.

Usage

1
2
KH.nineNumbers.by(DT, x, groupBy, titles = NULL, decimal = "default",
  order = NULL)

Arguments

DT

data.table date.table of at least one column of numbers and at least one column of factoring element to calculate statistics.

x

string. Name of vector containing the data to extract statistics for.

groupBy

string. Name of vector containig grouping factors.

titles

string. Vector of strings with 9 member as col.names of the results.

decimal

integer. Set precision for vectors in resultant quantile. Default is decimal in package.

order

string. Not implemented yet. Sort order of columns.

Details

For an appropriate insight into the data 9 numbers are consulted usually. These nine numbers consist of length, minimum, lower-hinge, median, upper-hinge, maximum, mean, sd of a data vector. This function creates a row for each grouped item.

See Also

Other Stats: KH.IQR, KH.max, KH.mean, KH.median, KH.min, KH.nineNumbers.table, KH.nineNumbers.total, KH.quant.10, KH.quant.25, KH.quant.75, KH.quant.n, KH.sd

Examples

1
2
3
4
5
6
7
8
9
{
set.seed(100)
library(data.table)
df <- data.table(
   x = rnorm(20),
   y = sample(LETTERS[1:3], 20, replace = TRUE)
)
x=KH.nineNumbers.by(df, 'x', 'y')
}

ks465/r-utils documentation built on May 23, 2019, 5:07 p.m.