[Rd] changed names from lm() in R-devel

Georgi Boshnakov georg|@bo@hn@kov @end|ng |rom m@nche@ter@@c@uk
Thu Feb 13 11:10:58 CET 2020


In the last week or so lm() in R-devel (and Rpatched, see https://cran.rstudio.com/web/checks/check_results_pcts.html) started to produce different names for some interactions, compared to R-3.6.x. A full example is at the end of this email but the gist is that a term  
"TimeIndex:Season", where "Season" is a factor produces names like "TimeIndex:Season1", while R-devel changes the order of the names to "Season1:TimeIndex", etc. 

Is this change on purpose? 

Georgi Boshnakov

---

ex_fac    <- as.factor(rep(1:4, 10))
ex_fo     <- as.formula("x ~ -1 - Season  + TimeIndex:Season")
ex_data   <- data.frame(x = rnorm(40), Season = ex_fac, TimeIndex = 1:40)
lm(ex_fo, data = ex_data, na.action = na.exclude)

## R version 3.6.1 (2019-07-05) -- "Action of the Toes"
##
## Call:
## lm(formula = ex_fo, data = ex_data, na.action = na.exclude)
##
## Coefficients:
## TimeIndex:Season1  TimeIndex:Season2  TimeIndex:Season3  TimeIndex:Season4
##         0.0036876         -0.0033619          0.0211838         -0.0008042


## R Under development (unstable) (2020-02-12 r77798) -- "Unsuffered
Consequences"
##
## Call:
## lm(formula = ex_fo, data = ex_data, na.action = na.exclude)
##
## Coefficients:
## Season1:TimeIndex  Season2:TimeIndex  Season3:TimeIndex  Season4:TimeIndex
##          -0.01033            0.02900            0.01791            0.01596


More information about the R-devel mailing list