Davis Vaughan
2019-Jan-24 13:56 UTC
[Rd] Inconsistent documentation of the return value of .getXlevels()
Hi all, 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? davis at rstudio.com is the email. Thanks! # Returns a named list of character vectors mf <- model.frame(Sepal.Width ~ Species, iris) termz <- terms(mf) .getXlevels(termz, mf) #> $Species #> [1] "setosa" "versicolor" "virginica" # Returns an empty named list mf2 <- model.frame(Sepal.Width ~ Sepal.Length, iris) termz2 <- terms(mf2) .getXlevels(termz2, mf2) #> named list() [[alternative HTML version deleted]]