Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qcc.groups

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

See Also

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)])

qcc

Quality Control Charts

v2.7
GPL (>= 2)
Authors
Luca Scrucca [aut, cre], Greg Snow [ctb], Peter Bloomfield [ctb]
Initial release
2017-07-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.