[Rd] Problem with contrasts bug fix?

Murray Efford murr@y@e||ord @end|ng |rom ot@go@@c@nz
Thu Jun 30 00:27:40 CEST 2022

This worked previously but gives an error in R-devel (Windows today), triggering a warning to a package maintainer:

contr.none <- function(n) contrasts(factor(1:n), contrasts = FALSE)
lm(uptake~Treatment, CO2, contrasts=list(Treatment=contr.none))

Error in 1:n : NA/NaN argument
In addition: Warning messages:
1: In 1:n : numerical expression has 2 elements: only the first used
2: In factor(1:n) : NAs introduced by coercion

More information about the R-devel mailing list