Displaying 10 results from an estimated 10 matches for "r_blog_class_think_2x".
2019 Nov 18
2
Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
...dex, class(o)[!inherits(o,"AsIs")] removes all elements of class(o), giving character(0).
> Thank you, Suharto !
> You are obviously right, and I'm a bit embarrassed by my
> overzealousness to follow my own recommendations in the R Blog
> http://bit.ly/R_blog_class_think_2x
> {*wrongly*: The recommendation was to "think again" ...}
> It's a "shame" that the wrong code did not trigger any checks,
> so if anybody has time... I'd be grateful for such a regression
> check.
Once I started thinking, it was easy to m...
2019 Nov 17
2
Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
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.
2019 Nov 10
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...age (codes and checks) that
> need adaption .. i.e., should be changed rather *before* the
> above change is activated in R-devel (and then will affect all CRAN
> and Bioconductor checks.)
>
> To this end, I've published an 'R Blog' yesterday,
>
> http://bit.ly/R_blog_class_think_2x
>
> which translates to
>
> https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html
>
> notably mentioning why using class(x) == "...." (or '!=') or
> switch(class(.) ...) is quite unsafe and hence bad and y...
2019 Nov 10
0
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...There are certainly many more package (codes and checks) that
need adaption .. i.e., should be changed rather *before* the
above change is activated in R-devel (and then will affect all CRAN
and Bioconductor checks.)
To this end, I've published an 'R Blog' yesterday,
http://bit.ly/R_blog_class_think_2x
which translates to
https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html
notably mentioning why using class(x) == "...." (or '!=') or
switch(class(.) ...) is quite unsafe and hence bad and you
should very often not replace...
2019 Nov 29
0
Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
...dex, class(o)[!inherits(o,"AsIs")] removes all elements of class(o), giving character(0).
? ? > Thank you, Suharto !
? ? > You are obviously right,? and I'm a bit embarrassed by my
? ? > overzealousness to follow my own recommendations in the? R Blog
? ? > http://bit.ly/R_blog_class_think_2x
? ? > {*wrongly*: The recommendation was to "think again" ...}
? ? > It's a "shame" that the wrong code did not trigger any checks,
? ? > so if anybody has time... I'd be grateful for such a regression
? ? > check.
Once I started thinking, it was easy to m...
2019 Nov 10
0
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...>> need adaption .. i.e., should be changed rather *before* the
>> above change is activated in R-devel (and then will affect all CRAN
>> and Bioconductor checks.)
>>
>> To this end, I've published an 'R Blog' yesterday,
>>
>> http://bit.ly/R_blog_class_think_2x
>>
>> which translates to
>>
>> https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html
>>
>> notably mentioning why using class(x) == "...." (or '!=') or
>> switch(class(.) ...) is quite...
2019 Nov 21
0
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
...cally offline for an extended weekend within 24h, now.
I hope this will eventually to lead to clean up and clarity in
R, and hence should be worth the pain of broken
back-compatibility and having to adapt your (almost always only
sub-optimally written ;-)) R code,
see also my Blog http://bit.ly/R_blog_class_think_2x
Martin Maechler
ETH Zurich and R Core team
2019 Nov 11
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...ged rather *before* the
>>> above change is activated in R-devel (and then will affect all CRAN
>>> and Bioconductor checks.)
>>>
>>> To this end, I've published an 'R Blog' yesterday,
>>>
>>> http://bit.ly/R_blog_class_think_2x
>>>
>>> which translates to
>>>
>>> https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html
>>>
>>> notably mentioning why using class(x) == "...." (or '!=...
2019 Nov 02
6
head.matrix can return 1000s of columns -- limit to n or add new argument?
Thanks Martin and Peter,
I agree that we can be careful and narrow and still see a nice improvement
in behavior. While Herve's point is valid and I understand his frustration,
I think staying within the matrix vs c(matrix, array) space is the right
scope for this work in terms of fiddling with inheritance.
As another point, I don't know off the top of my head of any other classes
which
2019 Nov 15
5
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
>>>>> Pages, Herve
>>>>> on Thu, 14 Nov 2019 19:13:47 +0000 writes:
> On 11/14/19 05:47, Hadley Wickham wrote:
>> On Sun, Nov 10, 2019 at 2:37 AM Martin Maechler
>> <maechler at stat.math.ethz.ch> wrote:
>>>
>>>>>>>> Gabriel Becker
>>>>>>>> on Sat, 2 Nov 2019