# NOT RUN {
x <- model.frame(Species ~ offset(Sepal.Width), iris)
model_offset(terms(x), x)
xx <- model.frame(Species ~ offset(Sepal.Width) + offset(Sepal.Length), iris)
model_offset(terms(xx), xx)
# Problematic columns are caught with intuitive errors
tryCatch(
expr = {
x <- model.frame(~ offset(Species), iris)
model_offset(terms(x), x)
},
error = function(e) {
print(e$message)
}
)
# }
Run the code above in your browser using DataLab