x <- fixed.factor("factor", c("level1","level2"))
y <- random.factor("factor")
stopifnot(is.fixedFactor(x) && !is.randomFactor(x))
stopifnot(!is.fixedFactor(y) && is.randomFactor(y))
stopifnot(is.designFactor(x) && is.designFactor(y))
Run the code above in your browser using DataLab