search for: fredhutch

Displaying 20 results from an estimated 342 matches for "fredhutch".

2019 Mar 22
2
selectMethod() can fail to find methods in situations of multiple dispatch
...t of complexity, but "ANY" truncation has been happening since at least 2003. > matchSignature(c("numeric", "ANY"), foo) x "numeric" So I'm not sure we want to mess with it. Michael On Thu, Mar 21, 2019 at 8:14 PM Pages, Herve <hpages at fredhutch.org<mailto:hpages at fredhutch.org>> wrote: Hi Michael, Thanks for looking into this. I suspect that truncation of ANY suffixes from method signatures is also the culprit behind the sudden breakage of aliases of the form \alias{foo,numeric-method} when a method without the ANY suffix in...
2016 Mar 19
2
unary class union of an S3 class
On 03/19/2016 01:22 AM, Michael Lawrence wrote: > > > On Sat, Mar 19, 2016 at 12:10 AM, Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > On 03/18/2016 03:28 PM, Michael Lawrence wrote: > > > On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s > <hpages at fredhutch.org <mailto:hpages at fredhutch.org> > <mailto:hpages...
2019 Mar 22
2
selectMethod() can fail to find methods in situations of multiple dispatch
...rth? H. On 3/19/19 10:12, Michael Lawrence wrote: This is due to the intentional truncation of ANY suffixes from method signatures. I've hacked selectMethod() to be robust to that and will commit soon. Thanks for the report. Michael On Thu, Mar 14, 2019 at 9:32 AM Pages, Herve <hpages at fredhutch.org<mailto:hpages at fredhutch.org>> wrote: Here is an example: setGeneric("foo", function(x, y) standardGeneric("foo")) setMethod("foo", c("numeric", "ANY"), function(x, y) cat("I'm the foo#numeric#ANY method\n")...
2020 May 22
5
paste(character(0), collapse="", recycle0=FALSE) should be ""
...ttp-3A__tibco.com&d=DwMFaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=Z1o-HO3_OqxOR9LaRguGvnG7X4vF_z1_q13I7zmjcfY&s=7ZT1IjmexPqsDBhrV3NspPTr8M8XiMweEwJWErgAlqw&e=> > > > On Fri, May 22, 2020 at 9:12 AM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > I think that > > ? ? paste(c("a", "b"), NULL, c("c",? "d"),? sep = " ", collapse > = ",", > recycle0=TRUE) > >...
2020 May 24
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
Herve (et al.), On Fri, May 22, 2020 at 3:16 PM Herv? Pag?s <hpages at fredhutch.org> wrote: > Gabe, > > It's the current behavior of paste() that is a major source of bugs: > > ## Add "rs" prefix to SNP ids and collapse them in a > ## comma-separated string. > collapse_snp_ids <- function(snp_ids) > paste("rs&qu...
2020 Mar 27
1
object.size vs lobstr::obj_size
On 3/27/20 15:19, Hadley Wickham wrote: > > > On Fri, Mar 27, 2020 at 4:01 PM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > > > On 3/27/20 12:00, Hadley Wickham wrote: > > > > > > On Fri, Mar 27, 2020 at 10:39 AM Herv? Pag?s > <hpages at fredhutch.org <mailto:hpages at fredhutch.org> >...
2020 May 22
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
...ing collapse happens last so collapse=non-NULL always leads to a single character string being returned, the same as paste(collapse=""). See the altPaste function I posted yesterday. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, May 22, 2020 at 9:12 AM Herv? Pag?s <hpages at fredhutch.org> wrote: > I think that > > paste(c("a", "b"), NULL, c("c", "d"), sep = " ", collapse = ",", > recycle0=TRUE) > > should just return an empty string and don't see why it needs to emit a > warning or ra...
2018 Jan 30
2
as.list method for by Objects
by() does not always return a list. In Gabe's example, it returns an integer, thus it is coerced to a list. as.list() means that it should be a VECSXP, not necessarily with "list" in the class attribute. Michael On Tue, Jan 30, 2018 at 2:41 PM, Herv? Pag?s <hpages at fredhutch.org> wrote: > Hi Gabe, > > Interestingly the behavior of as.list() on by objects seem to > depend on the object itself: > > > b1 <- by(1:2, 1:2, identity) > > class(as.list(b1)) > [1] "list" > > > b2 <- by(warpbreaks[, 1:2], warpbreaks[,&qu...
2019 Mar 14
2
selectMethod() can fail to find methods in situations of multiple dispatch
...c" "logical" defined "numeric" "ANY" Thanks, H. -- Herv? Pag?s Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fredhutch.org<mailto:hpages at fredhutch.org> Phone: (206) 667-5791 Fax: (206) 667-1319 [[alternative HTML version deleted]]
2017 Nov 29
2
binary form of is() contradicts its unary form
...bject class is always `data.frame` here, check: > > > class(data.frame()) > [1] "data.frame" > > is(data.frame(), "data.frame") > [1] TRUE > > Best, > Mehmet > > > > > > On 29 Nov 2017 19:13, "Herv? Pag?s" <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi, > > The unary forms of is() and extends() report that data.frame > extends list, oldClass, and vector: > > > is(data.frame()) > [1] "data.frame" "list" &...
2018 Jan 30
2
as.list method for by Objects
...ot sure we can expect consistency across methods beyond that, nor is it feasible at this point to match the semantics of the methods package. It deals in "class space" while as.list() deals in "typeof() space". Michael On Tue, Jan 30, 2018 at 3:47 PM, Herv? Pag?s <hpages at fredhutch.org> wrote: > On 01/30/2018 02:50 PM, Michael Lawrence wrote: > >> by() does not always return a list. In Gabe's example, it returns an >> integer, thus it is coerced to a list. as.list() means that it should be a >> VECSXP, not necessarily with "list" in t...
2020 Mar 27
2
object.size vs lobstr::obj_size
On 3/27/20 12:00, Hadley Wickham wrote: > > > On Fri, Mar 27, 2020 at 10:39 AM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi Tomas, > > On 3/27/20 07:01, Tomas Kalibera wrote: > > they provide an over-approximation > > They can also provide an "under-approximation" (to say the least) e.g. > on r...
2018 Jan 30
0
as.list method for by Objects
...s this on a data.frame so why did someone bother adding an as.list.data.frame method that does strict coercion? 2) The S4 coercion system based on as() does strict coercion by default. H. > > Michael > > On Tue, Jan 30, 2018 at 2:41 PM, Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi Gabe, > > Interestingly the behavior of as.list() on by objects seem to > depend on the object itself: > > > b1 <- by(1:2, 1:2, identity) > > class(as.list(b1)) > [1]...
2016 Mar 19
0
unary class union of an S3 class
On Sat, Mar 19, 2016 at 4:29 AM, Herv? Pag?s <hpages at fredhutch.org> wrote: > On 03/19/2016 01:22 AM, Michael Lawrence wrote: > >> >> >> On Sat, Mar 19, 2016 at 12:10 AM, Herv? Pag?s <hpages at fredhutch.org >> <mailto:hpages at fredhutch.org>> wrote: >> >> On 03/18/2016 03:28 PM, Michael Lawrence wr...
2020 May 22
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
...hink if it does this there should be at least a warning when paste collapses to "" this way, if it is allowed at all (ie if mixing collapse=<string> and recycle0=TRUE is not simply made an error). I would like to hear others' thoughts as well though. @Pages, Herve <hpages at fredhutch.org> @William Dunlap <wdunlap at tibco.com> is "" what you envision as thee desired and useful behavior there? Best, ~G > I have not yet my mind up but would tend to agree to "you guys", > but I think that other R Core members should chime in, too. > > M...
2015 Sep 29
1
making object.size() more meaningful on environments?
...d accepted approach. No need to look far: a character vector is just a collection of pointers to stuff that is shared thru the global CHARSXP cache and AFAIK object.size() takes this stuff into account. H. > > ~G > > > > On Tue, Sep 29, 2015 at 2:42 PM, Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi, > > Currently object.size() is not very useful on environments as it always > returns 56 bytes, no matter how big the environment is: > > env1 <- new.env() > object.size(env1) #...
2016 Mar 19
2
unary class union of an S3 class
On 03/18/2016 03:28 PM, Michael Lawrence wrote: > > On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi, > > Short story > ----------- > > setClassUnion("ArrayLike", "array") > > showClass("ArrayLike") # no slot > > setClass("MyArrayLi...
2015 Sep 29
3
making object.size() more meaningful on environments?
...es. What about changing this and make it return something more meaningful? Cheers, H. -- Herv? Pag?s Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fredhutch.org Phone: (206) 667-5791 Fax: (206) 667-1319
2020 May 22
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
...be at least a warning when paste > collapses to "" this way, if it is allowed at all (ie if mixing > collapse=<string>and recycle0=TRUEis not simply made an error). > > I would like to hear others' thoughts as well though. @Pages, Herve > <mailto:hpages at fredhutch.org> @William Dunlap > <mailto:wdunlap at tibco.com>?is "" what you envision as thee desired and > useful behavior there? > > Best, > ~G > > > > I have not yet my mind up but would tend to agree to "you guys", > but I think th...
2020 May 22
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
...NULL > always leads to a single character string being returned, the same as > paste(collapse=""). See the altPaste function I posted yesterday. > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > > On Fri, May 22, 2020 at 9:12 AM Herv? Pag?s <hpages at fredhutch.org> wrote: > >> I think that >> >> paste(c("a", "b"), NULL, c("c", "d"), sep = " ", collapse = ",", >> recycle0=TRUE) >> >> should just return an empty string and don't see why it needs...