Displaying 20 results from an estimated 9000 matches similar to: "\value section for write_PACKAGES not updated"
2014 May 07
0
Historical NA question (Herv? Pag?s)
"Equivalence" certainly does not mean that literally replacing some text will not change the result.
>From "R language definition", p. 11:
> Except for the syntax, there is no difference between applying an operator and calling a
function. In fact, x + y can equivalently be written ?+?(x, y). Notice that since ?+? is a nonstandard
function name, it needs to be quoted.
2019 Mar 22
0
selectMethod() can fail to find methods in situations of multiple dispatch
Agreed but I'm not sure we want users accessing documentation with those
types of aliases. One option is the method?foo("numeric") syntax.
On Thu, Mar 21, 2019 at 9:52 PM Pages, Herve <hpages at fredhutch.org> wrote:
> Fine with me as long as eliminating the inconveniences associated with it
> can be put on the roadmap. The alias instability and the fact that the user
2018 Jan 30
0
as.list method for by Objects
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 the class attribute.
The documentation is not particularly clear about what as.list()
means for list derivatives. IMO clarifications
2017 Nov 29
2
binary form of is() contradicts its unary form
Yes, data.frame is not an S4 class but is(data.frame())
finds its super-classes anyway and without the need to wrap
it in asS4(). And "list' is one of the super-classes. Then
is(data.frame(), "list") contradicts this.
I'm not asking for a workaround. I already have one with
'class2 %in% is(object)' as reported in my original post.
'is(asS4(object), class2)'
2012 Oct 24
0
Shouldn't the \usage section tell the truth?
Hi,
The signature of mget() changed between R-2.15.1 and recent R-devel.
In R-2.15.1:
> args(mget)
function (x, envir, mode = "any", ifnotfound = list(function(x)
stop(paste0("value for '",
x, "' not found"), call. = FALSE)), inherits = FALSE)
NULL
In R-devel:
> args(mget)
function (x, envir, mode = "any", ifnotfound
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 wrote:
>>
>>
>>
2017 Nov 29
0
binary form of is() contradicts its unary form
Hi Herve,
Interesting observation with `setClass` but it is for S4. It looks
like `data.frame()` is not an S4 class.
> isS4(data.frame())
[1] FALSE
And in your case this might help:
> is(asS4(data.frame()), "list")
[1] TRUE
Looks like `is` is designed for S4 classes, I am not entirely sure.
Best,
-Mehmet
On 29 November 2017 at 20:46, Herv? Pag?s <hpages at
2017 May 03
0
stopifnot() does not stop at first non-TRUE argument
On 05/03/2017 12:04 PM, Herv? Pag?s wrote:
> Not sure why the performance penalty of nonstandard evaluation would
> be more of a concern here than for something like switch().
which is actually a primitive. So it seems that there is at least
another way to go than 'dots <- match.call(expand.dots=FALSE)$...'
Thanks,
H.
>
> If that can't/won't be fixed, what about
2019 Mar 22
0
selectMethod() can fail to find methods in situations of multiple dispatch
If we started over, I'd try to avoid this sort 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> wrote:
> Hi Michael,
>
2015 Sep 29
1
making object.size() more meaningful on environments?
Hi Gabe,
On 09/29/2015 02:51 PM, Gabriel Becker wrote:
> Herve,
>
> The problem then would be that for A a refClass whose fields take up N
> bytes (in the sense that you mean), if we do
>
> B <- A
>
> A and B would look like the BOTH take up N bytes, for a total of 2N,
> whereas AFAIK R would only be using ~ N + 2*56 bytes, right?
Yes, but that's still a *much*
2018 Jan 30
0
as.list method for by Objects
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[,"tension"], summary)
> class(as.list(b2))
[1] "by"
This is with R 3.4.3 and R devel (2017-12-11 r73889).
H.
On 01/30/2018 02:33 PM,
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", snp_ids,
2018 May 16
0
Dispatch mechanism seems to alter object before calling method on it
On Wed, May 16, 2018 at 12:23 PM, Herv? Pag?s <hpages at fredhutch.org> wrote:
> On 05/16/2018 10:22 AM, Michael Lawrence wrote:
>>
>> Factors and data.frames are not structures, because they must have a
>> class attribute. Just call them "objects". They are higher level than
>> structures, which in practice just shape data without adding a lot of
2020 May 22
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
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 raise an error. To me it does exactly what the user is asking
for, which is to change how the 3 arguments are recycled **before** the
'sep'
2014 Mar 27
3
[Bioc-devel] Conflicting definitions for function redefined as S4 generics
On 03/27/2014 02:13 AM, Ulrich Bodenhofer wrote:
> I fully agree, Michael, that this would be a great thing to have! I have
> often wondered why R and the standard packages are still sticking so
> much to the old-style S3 flavor though S4 is part of standard R. I
> acknowledge that backward compatibility is important, but, as far as I
> got it, redefining a function or S3 generic as
2012 Nov 15
0
R-devel Digest, Vol 117, Issue 13
Hi,
> ... Wrong. It looks like internally a[[1]] is always used instead of a[[i]].
> The real problem it seems is that 'a' is treated as if it was of
> ength 1:
>
> > mapply(function(x, y) {x * y}, a, 1:3)
> [1] 101 202 303
> > mapply(function(x, y) {x * y}, a, 5)
> [1] 505
>
> In other words, internal dispatch works for [[ but not for length().
2011 Aug 02
0
png() broken in R-devel
Hi,
Seems like this recent change broke the png() device:
hpages at latitude:~/svn/R-devel/src/library/grDevices/src$ svn diff -r
56568:56569
Index: cairo/Makefile.in
===================================================================
--- cairo/Makefile.in (revision 56568)
+++ cairo/Makefile.in (revision 56569)
@@ -38,7 +38,8 @@
R: Makefile
@$(MAKE) $(cairo_la)
- @cp $(cairo_la)
2019 Mar 22
2
selectMethod() can fail to find methods in situations of multiple dispatch
Fine with me as long as eliminating the inconveniences associated with it can be put on the roadmap. The alias instability and the fact that the user has no way to know if s/he should do ?`foo,numeric-method` or ?`foo,numeric,ANY-method` to find the method has been a long-standing problem.
H.
On 3/21/19 21:29, Michael Lawrence wrote:
If we started over, I'd try to avoid this sort of
2020 May 22
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
I understand that this is consistent but it also strikes me as an enormous
'gotcha' of a magnitude that 'we' are trying to avoid/smooth over at this
point in user-facing R space.
For the record I'm not suggesting it should return something other than "",
and in particular I'm not arguing that any call to paste *that does not
return an error* with non-NULL
2017 May 15
0
stopifnot() does not stop at first non-TRUE argument
Hello,
I am a new on this list, so I introduce myself very briefly:
my background is applied mathematics, more precisely scientific calculus
applied for modeling metabolic systems, I am author/maintainer of
few packages (Deriv, rmumps, arrApply).
Now, on the subject of this discussion, I must say that I don't really understand
Peter's argument:
>>> To do it differently,