## Not run:
# data1 <- data.frame(site=gl(3,8), lot=factor(rep(c(2,3,1,2,3,1),
# rep(4,6))), day=rep(1:12, rep(2,12)), y=rnorm(24,25,1))
#
# # not all combinations of 'site' and 'lot' in 'data1'
#
# VCA:::isBalanced(y~site+lot+site:lot:day, data1)
#
# # balanced design for this model
#
# VCA:::isBalanced(y~lot+lot:day, data1)
#
# # gets unbalanced if observation is NA
#
# data1[1,"y"] <- NA
# VCA:::isBalanced(y~lot+lot:day, data1)
# VCA:::isBalanced(y~lot+lot:day, data1, FALSE)
# ## End(Not run)
Run the code above in your browser using DataLab