statsByGroup {GCDkit}R Documentation

Statistics by groups

Description

Calculates simple descriptive statistics for individual columns of the given data matrix; optionally this can be done for each of the groups separately.

Usage

    statsByGroup(dataset = WR, groups = NULL)

Arguments

dataset

numeric data matrix.

groups

a vector, in which is specified, for each sample, a group it belongs to.

Details

The function returns a list containing the calculated statistical parameters respecting the current grouping. The statistical summary involves number of observations, missing values, mean, standard deviation, minimum, 25% quartile, median (= 50% quartile), 75% quartile and maximum. This is a core function invoked both by summarySingle and summarySingleByGroup.

Value

results

a matrix with the means and single standard deviations of both variables for each of the individual groups

Author(s)

Vojtěch Janoušek, vojtech.janousek@geology.cz

See Also

summarySingle

statistics

summaryAll

summaryByGroup

Examples

    data(blatna)
    accessVar("blatna")
    groupsByLabel("Suite")
    
    statsByGroup()

    statsByGroup(WR[,LILE])

[Package GCDkit version 6.1 Index]