Learn R Programming

designr (version 0.1.11)

nobs,factorDesign-method: Retrieve the number of observations

Description

Retrieve the number of observations

Usage

# S4 method for factorDesign
nobs(object)

Arguments

object

A designFactor object

Value

The number of observations

Examples

Run this code
# NOT RUN {
des <- fixed.factor("Factor1", c("1A","1B")) +
       fixed.factor("Factor2", c("2A","2B")) +
       random.factor("Subject", c("Factor1"))
       
nobs(des)

stopifnot(nobs(des) == 4)

# }

Run the code above in your browser using DataLab