[prev in list] [next in list] [prev in thread] [next in thread]
List: r-devel
Subject: [Rd] Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
From: suharto_anggono--- via R-devel <r-devel () r-project ! org>
Date: 2019-11-17 10:34:31
Message-ID: 1709347581.898771.1573986871851 () mail ! yahoo ! com
[Download RAW message or body]
SVN revision 77401 changes
x[isM] <- lapply(x[isM], function(o) `class<-`(o, \
class(o)[class(o) != "AsIs"])) to
x[isM] <- lapply(x[isM], function(o) `class<-`(o, \
class(o)[!inherits(o,"AsIs")])) in function 'get_all_vars' in \
src/library/stats/R/models.R in R devel.
The change is inappropriate.
class(o)[class(o) != "AsIs"] removes "AsIs" from class(o), giving class(o) \
without "AsIs".
On the other hand, inherits(o,"AsIs") is just a single logical value. If \
"AsIs" is in class(o), inherits(o,"AsIs") is TRUE. In that case, by recycling \
of logical index, class(o)[!inherits(o,"AsIs")] removes all elements of \
class(o), giving character(0).
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic