[Rd] RIOT 2020

2020-02-25 Thread Stepan
I hope you don’t mind us using this mailing list for a small 
advertisement, but we think it is most relevant for this group:


We'd like to invite you to RIOT 2020 - the 5rd workshop on R 
Implementation, Optimization and Tooling [1]. It will take place 
co-located with, and during, useR! 2020 in St. Louis on July 8th. RIOT 
is an excellent venue for deep technical discussions about R 
implementations, tools, optimizations and R extension, and will be very 
interesting for anyone interested in what’s under the hood of R.


Regards,
Stepan Sindelar, Lukas Stadler (Oracle Labs), Jan Vitek (Northeastern), 
Alexander Bertram (BeDataDriven)


[1] http://riotworkshop.github.io/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Possible Regression in setClassUnion between 3.5.0 and 3.6.0

2020-02-25 Thread Michael Lawrence via R-devel
This seems to work as expected (returning "hi!") in R-devel, but there
have been so many destabilizing changes to methods that it would be
tough to port this to release. Probably should just wait for 4.0.

Michael

On Tue, Feb 18, 2020 at 8:00 PM Michael Lawrence  wrote:
>
> Thanks, I'll look into it.
>
> On Tue, Feb 18, 2020 at 8:32 AM Ezra Tucker  wrote:
> >
> > Hi Robert,
> >
> > This looks like a bug to me (tested in R 3.6.2 on Windows), f(new("a"))
> > should return "hi!". I'll add that this DOES work properly in 3.6.1
> > which leads me to suspect this could be due to the subtle change in the
> > way method dispatch was performed to fix a different bug, in 3.6.2. Can
> > anybody else confirm that?
> >
> >
> > On 2/18/2020 9:32 AM, Robert Harlow wrote:
> > > I am trying to create a class union of class unions to facilitate method
> > > dispatch. When I execute code in the global environment, everything acts 
> > > as
> > > expected, however when I put the same code in the context of a package,
> > > selectMethod can no longer find the correct method. This first block below
> > > puts the code in the context of a package:
> > >
> > > fn <- "codefile.R"
> > > writeLines(
> > >  c(
> > >  "setClass('x', slots = list(slot ='character'))",
> > >  "setClass('y', slots = list(slot ='character'))",
> > >  "setClass('a', slots = list(slot ='character'))",
> > >  "setClass('b', slots = list(slot ='character'))",
> > >  "setClassUnion('xy', c('x', 'y'))",
> > >  "setClassUnion('ab', c('a', 'b'))",
> > >  "setClassUnion('xyab', c('xy', 'ab'))",
> > >  "setGeneric('f', function(object, ...) standardGeneric('f'))",
> > >  "setMethod('f', 'xyab', function(object, ...) print('hi!'))"
> > >  ),
> > >  con = fn
> > > )
> > > package.skeleton(code_files = "codefile.R")
> > > system("rm -rf anRpackage/man")
> > > system("R CMD INSTALL anRpackage")
> > > library(anRpackage)
> > > ## fails in R 3.6.2, but works in R 3.5.0
> > > f(new("a"))
> > >
> > > Next, if a fresh R 3.6.2 session is started and I execute the following at
> > > the prompt, method dispatch works as expected.
> > >
> > > setClass("x", slots = list(slot ="character"))
> > > setClass("y", slots = list(slot ="character"))
> > > setClass("a", slots = list(slot ="character"))
> > > setClass("b", slots = list(slot ="character"))
> > > setClassUnion("xy", c("x", "y"))
> > > setClassUnion("ab", c("a", "b"))
> > > setClassUnion("xyab", c("xy", "ab"))
> > > setGeneric("f", function(object, ...) standardGeneric("f"))
> > > setMethod("f", "xyab", function(object, ...) print("hi!"))
> > > ## print's "hi!" as expected
> > > f(new("a"))
> > >
> > > I have also posted to stack overflow here:
> > > https://stackoverflow.com/questions/60264786/r-s4-class-union-of-class-unions?noredirect=1#comment106627883_60264786,
> > > (the example in this note removes devtools to make the environment
> > > cleaner).
> > >
> > > Interestingly, the issue only seems to arise when there are > 1 layer
> > > of the class union. E.g. if I were to setMethod on "ab" instead of
> > > "xyab", method dispatch would work as expected. I am not posting a bug
> > > yet as it is still unclear to me if I am doing something incorrect.
> > >
> > > My sessionInfo() is :
> > >
> > > R version 3.6.2 (2019-12-12)
> > > Platform: x86_64-pc-linux-gnu (64-bit)
> > > Running under: Ubuntu 18.04.3 LTS
> > >
> > > Matrix products: default
> > > BLAS:   /usr/local/lib/R/lib/libRblas.so
> > > LAPACK: /usr/local/lib/R/lib/libRlapack.so
> > >
> > > locale:
> > >   [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
> > >   [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
> > >   [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
> > >   [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
> > >   [9] LC_ADDRESS=C   LC_TELEPHONE=C
> > > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
> > >
> > > attached base packages:
> > > [1] stats graphics  grDevices utils datasets  methods   base
> > >
> > > other attached packages:
> > > [1] anRpackage_1.0
> > >
> > > loaded via a namespace (and not attached):
> > > [1] compiler_3.6.2 tools_3.6.2
> > >
> > > Thanks in advance for the help!
> > >
> > >   [[alternative HTML version deleted]]
> > >
> > > __
> > > R-devel@r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>
> --
> Michael Lawrence
> Senior Scientist, Bioinformatics and Computational Biology
> Genentech, A Member of the Roche Group
> Office +1 (650) 225-7760
> micha...@gene.com
>
> Join Genentech on LinkedIn | Twitter | Facebook | Instagram | YouTube



-- 
Michael Lawrence
Senior Scientist, Bioinformatics and Computational Biology
Genentech, A Member of the Roche Group
Office +1 (650) 225-7760
micha...@g

Re: [Rd] Possible Regression in setClassUnion between 3.5.0 and 3.6.0

2020-02-25 Thread Robert Harlow
Okay - that makes sense and thanks for looking into this! As an aside, from
R-devel's perspective would you say methods are stabilizing again or do you
foresee a lot of changes coming in the 4.* series?

On Tue, Feb 25, 2020 at 3:39 PM Michael Lawrence via R-devel <
r-devel@r-project.org> wrote:

> This seems to work as expected (returning "hi!") in R-devel, but there
> have been so many destabilizing changes to methods that it would be
> tough to port this to release. Probably should just wait for 4.0.
>
> Michael
>
> On Tue, Feb 18, 2020 at 8:00 PM Michael Lawrence 
> wrote:
> >
> > Thanks, I'll look into it.
> >
> > On Tue, Feb 18, 2020 at 8:32 AM Ezra Tucker  wrote:
> > >
> > > Hi Robert,
> > >
> > > This looks like a bug to me (tested in R 3.6.2 on Windows), f(new("a"))
> > > should return "hi!". I'll add that this DOES work properly in 3.6.1
> > > which leads me to suspect this could be due to the subtle change in the
> > > way method dispatch was performed to fix a different bug, in 3.6.2. Can
> > > anybody else confirm that?
> > >
> > >
> > > On 2/18/2020 9:32 AM, Robert Harlow wrote:
> > > > I am trying to create a class union of class unions to facilitate
> method
> > > > dispatch. When I execute code in the global environment, everything
> acts as
> > > > expected, however when I put the same code in the context of a
> package,
> > > > selectMethod can no longer find the correct method. This first block
> below
> > > > puts the code in the context of a package:
> > > >
> > > > fn <- "codefile.R"
> > > > writeLines(
> > > >  c(
> > > >  "setClass('x', slots = list(slot ='character'))",
> > > >  "setClass('y', slots = list(slot ='character'))",
> > > >  "setClass('a', slots = list(slot ='character'))",
> > > >  "setClass('b', slots = list(slot ='character'))",
> > > >  "setClassUnion('xy', c('x', 'y'))",
> > > >  "setClassUnion('ab', c('a', 'b'))",
> > > >  "setClassUnion('xyab', c('xy', 'ab'))",
> > > >  "setGeneric('f', function(object, ...)
> standardGeneric('f'))",
> > > >  "setMethod('f', 'xyab', function(object, ...) print('hi!'))"
> > > >  ),
> > > >  con = fn
> > > > )
> > > > package.skeleton(code_files = "codefile.R")
> > > > system("rm -rf anRpackage/man")
> > > > system("R CMD INSTALL anRpackage")
> > > > library(anRpackage)
> > > > ## fails in R 3.6.2, but works in R 3.5.0
> > > > f(new("a"))
> > > >
> > > > Next, if a fresh R 3.6.2 session is started and I execute the
> following at
> > > > the prompt, method dispatch works as expected.
> > > >
> > > > setClass("x", slots = list(slot ="character"))
> > > > setClass("y", slots = list(slot ="character"))
> > > > setClass("a", slots = list(slot ="character"))
> > > > setClass("b", slots = list(slot ="character"))
> > > > setClassUnion("xy", c("x", "y"))
> > > > setClassUnion("ab", c("a", "b"))
> > > > setClassUnion("xyab", c("xy", "ab"))
> > > > setGeneric("f", function(object, ...) standardGeneric("f"))
> > > > setMethod("f", "xyab", function(object, ...) print("hi!"))
> > > > ## print's "hi!" as expected
> > > > f(new("a"))
> > > >
> > > > I have also posted to stack overflow here:
> > > >
> https://stackoverflow.com/questions/60264786/r-s4-class-union-of-class-unions?noredirect=1#comment106627883_60264786
> ,
> > > > (the example in this note removes devtools to make the environment
> > > > cleaner).
> > > >
> > > > Interestingly, the issue only seems to arise when there are > 1 layer
> > > > of the class union. E.g. if I were to setMethod on "ab" instead of
> > > > "xyab", method dispatch would work as expected. I am not posting a
> bug
> > > > yet as it is still unclear to me if I am doing something incorrect.
> > > >
> > > > My sessionInfo() is :
> > > >
> > > > R version 3.6.2 (2019-12-12)
> > > > Platform: x86_64-pc-linux-gnu (64-bit)
> > > > Running under: Ubuntu 18.04.3 LTS
> > > >
> > > > Matrix products: default
> > > > BLAS:   /usr/local/lib/R/lib/libRblas.so
> > > > LAPACK: /usr/local/lib/R/lib/libRlapack.so
> > > >
> > > > locale:
> > > >   [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
> > > >   [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
> > > >   [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
> > > >   [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
> > > >   [9] LC_ADDRESS=C   LC_TELEPHONE=C
> > > > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
> > > >
> > > > attached base packages:
> > > > [1] stats graphics  grDevices utils datasets  methods   base
> > > >
> > > > other attached packages:
> > > > [1] anRpackage_1.0
> > > >
> > > > loaded via a namespace (and not attached):
> > > > [1] compiler_3.6.2 tools_3.6.2
> > > >
> > > > Thanks in advance for the help!
> > > >
> > > >   [[alternative HTML version deleted]]
> > > >
> > > > __
> > > > R-devel@r-project.org mailing list
> > > > https://stat.ethz.ch/mailman/listinfo/r-devel
> > >
> > > __

Re: [Rd] Possible Regression in setClassUnion between 3.5.0 and 3.6.0

2020-02-25 Thread Michael Lawrence via R-devel
They're stabilizing. All changes are internal and addressing bugs; not
user-facing.

On Tue, Feb 25, 2020 at 5:34 PM Robert Harlow  wrote:
>
> Okay - that makes sense and thanks for looking into this! As an aside, from 
> R-devel's perspective would you say methods are stabilizing again or do you 
> foresee a lot of changes coming in the 4.* series?
>
> On Tue, Feb 25, 2020 at 3:39 PM Michael Lawrence via R-devel 
>  wrote:
>>
>> This seems to work as expected (returning "hi!") in R-devel, but there
>> have been so many destabilizing changes to methods that it would be
>> tough to port this to release. Probably should just wait for 4.0.
>>
>> Michael
>>
>> On Tue, Feb 18, 2020 at 8:00 PM Michael Lawrence  wrote:
>> >
>> > Thanks, I'll look into it.
>> >
>> > On Tue, Feb 18, 2020 at 8:32 AM Ezra Tucker  wrote:
>> > >
>> > > Hi Robert,
>> > >
>> > > This looks like a bug to me (tested in R 3.6.2 on Windows), f(new("a"))
>> > > should return "hi!". I'll add that this DOES work properly in 3.6.1
>> > > which leads me to suspect this could be due to the subtle change in the
>> > > way method dispatch was performed to fix a different bug, in 3.6.2. Can
>> > > anybody else confirm that?
>> > >
>> > >
>> > > On 2/18/2020 9:32 AM, Robert Harlow wrote:
>> > > > I am trying to create a class union of class unions to facilitate 
>> > > > method
>> > > > dispatch. When I execute code in the global environment, everything 
>> > > > acts as
>> > > > expected, however when I put the same code in the context of a package,
>> > > > selectMethod can no longer find the correct method. This first block 
>> > > > below
>> > > > puts the code in the context of a package:
>> > > >
>> > > > fn <- "codefile.R"
>> > > > writeLines(
>> > > >  c(
>> > > >  "setClass('x', slots = list(slot ='character'))",
>> > > >  "setClass('y', slots = list(slot ='character'))",
>> > > >  "setClass('a', slots = list(slot ='character'))",
>> > > >  "setClass('b', slots = list(slot ='character'))",
>> > > >  "setClassUnion('xy', c('x', 'y'))",
>> > > >  "setClassUnion('ab', c('a', 'b'))",
>> > > >  "setClassUnion('xyab', c('xy', 'ab'))",
>> > > >  "setGeneric('f', function(object, ...) standardGeneric('f'))",
>> > > >  "setMethod('f', 'xyab', function(object, ...) print('hi!'))"
>> > > >  ),
>> > > >  con = fn
>> > > > )
>> > > > package.skeleton(code_files = "codefile.R")
>> > > > system("rm -rf anRpackage/man")
>> > > > system("R CMD INSTALL anRpackage")
>> > > > library(anRpackage)
>> > > > ## fails in R 3.6.2, but works in R 3.5.0
>> > > > f(new("a"))
>> > > >
>> > > > Next, if a fresh R 3.6.2 session is started and I execute the 
>> > > > following at
>> > > > the prompt, method dispatch works as expected.
>> > > >
>> > > > setClass("x", slots = list(slot ="character"))
>> > > > setClass("y", slots = list(slot ="character"))
>> > > > setClass("a", slots = list(slot ="character"))
>> > > > setClass("b", slots = list(slot ="character"))
>> > > > setClassUnion("xy", c("x", "y"))
>> > > > setClassUnion("ab", c("a", "b"))
>> > > > setClassUnion("xyab", c("xy", "ab"))
>> > > > setGeneric("f", function(object, ...) standardGeneric("f"))
>> > > > setMethod("f", "xyab", function(object, ...) print("hi!"))
>> > > > ## print's "hi!" as expected
>> > > > f(new("a"))
>> > > >
>> > > > I have also posted to stack overflow here:
>> > > > https://stackoverflow.com/questions/60264786/r-s4-class-union-of-class-unions?noredirect=1#comment106627883_60264786,
>> > > > (the example in this note removes devtools to make the environment
>> > > > cleaner).
>> > > >
>> > > > Interestingly, the issue only seems to arise when there are > 1 layer
>> > > > of the class union. E.g. if I were to setMethod on "ab" instead of
>> > > > "xyab", method dispatch would work as expected. I am not posting a bug
>> > > > yet as it is still unclear to me if I am doing something incorrect.
>> > > >
>> > > > My sessionInfo() is :
>> > > >
>> > > > R version 3.6.2 (2019-12-12)
>> > > > Platform: x86_64-pc-linux-gnu (64-bit)
>> > > > Running under: Ubuntu 18.04.3 LTS
>> > > >
>> > > > Matrix products: default
>> > > > BLAS:   /usr/local/lib/R/lib/libRblas.so
>> > > > LAPACK: /usr/local/lib/R/lib/libRlapack.so
>> > > >
>> > > > locale:
>> > > >   [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
>> > > >   [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
>> > > >   [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
>> > > >   [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
>> > > >   [9] LC_ADDRESS=C   LC_TELEPHONE=C
>> > > > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>> > > >
>> > > > attached base packages:
>> > > > [1] stats graphics  grDevices utils datasets  methods   base
>> > > >
>> > > > other attached packages:
>> > > > [1] anRpackage_1.0
>> > > >
>> > > > loaded via a namespace (and not attached):
>> > > > [1] compiler_3.6.2 tools_3.6.2
>> > > >
>> > > > Thanks in advance for