Re: [Rd] problem in levels<- and other inconsistencies

2016-09-28 Thread jens . oehlschlaegel
Oehlschlägel" , r-devel@r-project.org Betreff: Re: [Rd] problem in levels<- and other inconsistencies Hi, I totally agree that having foo(x) <- foo(x) behave like a no-op is a must. This is something I try to be careful about when I design my own objects and their getters and setters.

Re: [Rd] problem in levels<- and other inconsistencies

2016-09-27 Thread Hervé Pagès
Hi, I totally agree that having foo(x) <- foo(x) behave like a no-op is a must. This is something I try to be careful about when I design my own objects and their getters and setters. Just wanted to mention though that there is notorious violation of this: x <- list(3:-1, NULL) x[[2]] <- x[

[Rd] problem in levels<- and other inconsistencies

2016-09-27 Thread Dr. Jens Oehlschlägel
# A couple of years ago # I helped making R's character NA handling more consistent # Today I report an issue with R's factor NA handling # The core problem is that # levels(g) <- levels(g) # can change the levels of g # more details below # Kind regards # Jens Oehlschlägel # Say I have an NA ele