Inconsistent documentation of the return value of .getXlevels()
I would like to report an inconsistency in the documentation regarding
.getXlevels(). The return value states that: ".getXlevels returns a named
character vector, or NULL." This is not consistent with what is actually
returned, as seen further below in this message.
I would suggest stating: ".getXlevels returns a named list of character
vectors, or an empty named list."
I would report this directly on bugzilla, but do not have an account. Can
an R Core member here create an account for me as well? [hidden email] is the email.
# Returns a named list of character vectors
mf <- model.frame(Sepal.Width ~ Species, iris)
termz <- terms(mf)
#>  "setosa" "versicolor" "virginica"
# Returns an empty named list
mf2 <- model.frame(Sepal.Width ~ Sepal.Length, iris)
termz2 <- terms(mf2)
#> named list()