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

Description Usage Arguments Details See Also Examples

Description

Produce complete table of nine-numbers grouped by a given column in the data plus a total row.

Usage

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

Arguments

DT

data.table. data.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. Vector containig name of grouping factors columns.

titles

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

rowname

string. A title for the row. This is handy for attaching the output to the table from Stats.nineNumbers.by.

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 both a table and a row for total data.

See Also

Other Stats: KH.IQR, KH.max, KH.mean, KH.median, KH.min, KH.nineNumbers.by, 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)
)
y=KH.nineNumbers.table(df, 'x', 'y')
}

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