replications
Number of Replications of Terms

Description

Returns a vector or a list of the number of replicates for each term in the formula.

Usage


replications(formula, data = NULL, na.action)

Arguments

formula a formula, a terms object, or a data frame. If a data frame, then data need not be given, and the formula "~ ." is implied.
data a data frame. If data is not given, the search list is used to find the objects in formula. Usually a data frame should be attached when data is not given.
na.action a function that specifies how missing values are handled. The default is the "na.action" attribute of data first, and then setting option of "na.action", or na.fail, if it is not set in cases.

Details

A test for balance is (!is.list(replications(formula,data))).
Value
returns a vector or a list whose length is the number of terms in formula.
See Also
aov.genyates, raov.
Examples
replications(post.mean ~ maskdim*spinsp, Sdatasets::wafer)
##        maskdim         spinsp maskdim:spinsp 
##              9              6              3

replications(Sdatasets::solder[,1:5]) ## $Opening ## [1] 300 ## ## $Solder ## [1] 450 ## ## $Mask ## Mask ## A1.5 A3 A6 B3 B6 ## 180 270 90 180 180 ## ## $PadType ## [1] 90 ## ## $Panel ## [1] 300

Package stats version 6.0.0-69
Package Index