qcc.groups {qcc}R Documentation

Grouping data based on a sample indicator

Description

This function allows to easily group data to use as input to the `qcc' function.

Usage

qcc.groups(data, sample)

Arguments

data the observed data values
sample the sample indicators for the data values

Value

The function returns a matrix of suitable dimensions. If one or more group have few observations than others, NA values are appended.

Author(s)

Luca Scrucca luca@stat.unipg.it

See Also

qcc

Examples

data(pistonrings)
attach(pistonrings)
# 40 sample of 5 obs each
qcc.groups(diameter, sample)
# some obs are removed, the result is still a 40x5 matrix but with NAs added
qcc.groups(diameter[-c(1,2,50,52, 199)], sample[-c(1,2,50,52, 199)])

[Package qcc version 1.2 Index]