Could not coerce `obj` to list; see previous error.

Error in as.list.default(obj) : 
  no method for coercing this S4 class to a vector
Error in nullify.default(obj, 1) : 
  Could not coerce `obj` to list; see previous error.

df1 <- data.frame(x = runif(10), y = runif(10), z = runif(10))

df2 <- data.frame(a = runif(5), b = runif(5), c = runif(5))

Warning: stack imbalance in 'withVisible', 88 then 166

Warning: stack imbalance in 'withVisible', 88 then 162

`mdl3$terms[[3]][[3]][[1]]` should be a call to `poly` (is a call to `log`)

[1] "`mdl3$terms[[3]][[3]][[1]]` should be a call to `poly` (is a call to `log`)"

Warning: stack imbalance in 'withVisible', 88 then 136

`mdl4$terms[[3]]` should be a call to `+` (is "symbol")

[1] "`mdl4$terms[[3]]` should be a call to `+` (is \"symbol\")"

Warning: stack imbalance in 'withVisible', 88 then 124

Argument `index` must be a valid subsetting index and if numeric must be greater than or equal to one.

Error in nullify.default(list(1, 2, 3), -2) : 
  Argument `index` must be a valid subsetting index and if numeric must be greater than or equal to one.

nullify(list(1, 2, 3, 4), c(TRUE, FALSE))

nullify(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE))

Argument `obj` is not a multiple in length of argument `obj`

Warning in nullify.default(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE)) :
  Argument `obj` is not a multiple in length of argument `obj`

nullify(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE))

Argument `index` may be no longer than `obj` if it is logical.

Error in nullify.default(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE)) : 
  Argument `index` may be no longer than `obj` if it is logical.

Argument `index` contains values not present in names of `obj` (hello).

Error in nullify.default(list(1, 2, 3, 4), "hello") : 
  Argument `index` contains values not present in names of `obj` (hello).

Argument `index` can only contain values that exist within seq_along(`obj`).

Error in nullify.default(list(1, 2, 3), 4) : 
  Argument `index` can only contain values that exist within seq_along(`obj`).