[Rd] I() in merge (was: Re: xftrm is more than 100x slower for AsIs than for character vectors)

2024-07-16 Thread Hilmar Berger via R-devel
Dear all, actually, it is not clear to me why there is still a protection of the added Row.names column in merge using I(). This seems to stem from a time when R would automatically convert character vectors to factor in data.frame on insert. However, I can't reproduce this behaviour even in data

[Rd] xftrm is more than 100x slower for AsIs than for character vectors

2024-07-12 Thread Hilmar Berger via R-devel
Good evening, I recently have observed slow merges when combining multiple data frames derived from DataFrame and base::data.frame. I observed that the index column of intermediate tables was of class (automatically converted from character). The problem occurred mainly when using the sorted = T

Re: [Rd] Partial matching performance in data frame rownames using [

2023-12-21 Thread Hilmar Berger via R-devel
v wrote: On Wed, 13 Dec 2023 09:04:18 +0100 Hilmar Berger via R-devel wrote: Still, I feel that default partial matching cripples the functionality of data.frame for larger tables. Changing the default now would require a long deprecation cycle to give everyone who uses `[.data.frame` and relie

Re: [Rd] Partial matching performance in data frame rownames using [

2023-12-13 Thread Hilmar Berger via R-devel
Dear Ivan, thanks a lot, that is helpful. Still, I feel that default partial matching cripples the functionality of data.frame for larger tables. Thanks again and best regards Hilmar On 12.12.23 13:55, Ivan Krylov wrote: В Mon, 11 Dec 2023 21:11:48 +0100 Hilmar Berger via R-devel пишет

[Rd] Partial matching performance in data frame rownames using [

2023-12-11 Thread Hilmar Berger via R-devel
Dear all, I have seen that others have discussed the partial matching behaviour of data.frame[idx,] in the past, in particular with respect to unexpected results sets. I am aware of the fact that one can work around this using either match() or switching to tibble/data.table or similar altogethe

Re: [Rd] dbinom link

2020-05-23 Thread Hilmar Berger
What about using the Wayback Machine archive ? The web archive should be more stable than other links which also might disappear in the future. E.g. https://web.archive.org/web/20070610002602/http://www.herine.net/stat/software/dbinom.html , which also links to an archived copy of the PDF.

Re: [Rd] Why is matrix product slower when matrix has very small values?

2019-11-20 Thread Hilmar Berger
lman/listinfo/r-devel -- Dr. Hilmar Berger, MD Max Planck Institute for Infection Biology Charitéplatz 1 D-10117 Berlin GERMANY Phone: + 49 30 28460 430 Fax:+ 49 30 28460 401 E-Mail: ber...@mpiib-berlin.mpg.de Web : www.mpiib-berlin.mpg.de __

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-24 Thread Hilmar Berger
d most likely disappear with the fix you submitted for other 0-extent cases. Thanks again and best regards, Hilmar Am 18/09/2019 um 11:29 schrieb Martin Maechler: Martin Maechler on Wed, 18 Sep 2019 10:35:42 +0200 writes: >>>>> Hilmar Berger >>>>>

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-14 Thread Hilmar Berger
Ops.data.frame at all be dispatched for == object> ? setClass("FOOCLASS",   representation("list") ) ma = new("FOOCLASS", list(M=matrix(rnorm(300), 30,10))) isS4(ma) d_3 == ma # error A #######

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-11 Thread Hilmar Berger
matrix(rnorm(300), 30,10))) > isS4(ma) [1] TRUE > data.frame(a=1:3) == ma Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr,  :   length of 'dimnames' [2] not equal to array extent Best, Hilmar On 11/09/2019 12:24, Hilmar Berger wrote: Another examp

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-11 Thread Hilmar Berger
ible only for atomic and list types") if appropriate. Best regards, Hilmar On 11/09/2019 11:55, Hilmar Berger wrote: In the data.frame()==NULL cases I have the impression that the fact that both sides are non-atomic is not properly detected and therefore R tries to go on with the == met

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-11 Thread Hilmar Berger
ory check in Ops.data.frame() and some debugging I have the impression that the case of the second argument being non-atomic or empty is not handled at all and the function progresses until the end, where it fails in the last step on an empty value: matrix(unlist(value, recursive = FALSE, use.na

[Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-04 Thread Hilmar Berger
Dear all, I just stumbled upon some behavior of the == operator which is at least somewhat inconsistent. R version 3.6.1 (2019-07-05) -- "Action of the Toes" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) > list(a=1:3, b=LETTERS[1:3]) ==

[Rd] Seg fault stats::runmed

2018-10-05 Thread Hilmar Berger
ged: dd2 = c(rep(-1, 144), rep(1, 74), rep(NaN,82)) xx = runmed(dd2,21) Error in if (a < b) { : missing value where TRUE/FALSE needed Best regards, Hilmar -- Dr. Hilmar Berger, MD Max Planck Institute for Infection Biology Charitéplatz 1 D-10117 Berlin GERMANY Phone: + 49 30 28460 430 Fax:

Re: [Rd] A few suggestions and perspectives from a PhD student

2017-05-09 Thread Hilmar Berger
On 09/05/17 11:22, Joris Meys wrote: > > > On Tue, May 9, 2017 at 9:47 AM, Hilmar Berger > mailto:ber...@mpiib-berlin.mpg.de>> wrote: > > Hi, > > On 08/05/17 16:37, Ista Zahn wrote: > > One of the key strengths of R is that pac

Re: [Rd] A few suggestions and perspectives from a PhD student

2017-05-09 Thread Hilmar Berger
nguage, however, it introduces inconsistencies and uncertainties which could be avoided if some of the "modern" parts (including language concepts) could be more integrated in core-R. Best regards, Hilmar -- Dr. Hilmar Berger, MD Max Planck Institute for Infection Biology Charitéplatz 1

Re: [Rd] Crash after (wrongly) applying product operator on object from LIMMA package

2017-04-24 Thread Hilmar Berger
tions. See for example > http://r.789695.n4.nabble.com/segfault-in-gplots-heatmap-2-td4641808.html. > Also, the problem might be platform-specific. It would be interesting > to see whether anyone with a Mac can reproduce it. > > kind regards, > > j. > > > > >

Re: [Rd] Crash after (wrongly) applying product operator on object from LIMMA package

2017-04-19 Thread Hilmar Berger
tly the product operator is trying to do in the multiplication of the matrix with the object. Best regards, Hilmar On 18/04/17 18:57, Hilmar Berger wrote: Hi, this is a problem that occurs in the presence of two libraries (limma, xlsx) and leads to a crash of R. The problematic code is

[Rd] Crash after (wrongly) applying product operator on object from LIMMA package

2017-04-18 Thread Hilmar Berger
rJava_0.9-8limma_3.30.7 loaded via a namespace (and not attached): [1] tools_3.3.0 > > ma = new("MAList", list(A=matrix(rnorm(300), 30,10), M=matrix(rnorm(300), 30,10))) > #sweep(ma, 2, c(1:10), "*") > > f = match.fun("*") > f function (e1, e2)

Re: [Rd] write function (PR#10953)

2008-03-14 Thread Hilmar Berger
Hi Alexander, from the Help page of write: Usage write(x, file = "data", ncolumns = if(is.character(x)) 1 else 5, append = FALSE, sep = " ") Arguments x the data to be written out. file A connection, or a character string naming the file to write to. If "", print to the standard

[Rd] ifelse drops classes

2008-02-29 Thread Hilmar Berger
Hi all, I guess that this is rather a feature request than a bug report, but I'm not really sure: I stumbled over this today (R 2.6.2, WinXP): > c=c(as.Date("2007-01-01")) > class(c) [1] "Date" > ifelse(is.na(c),as.Date(Sys.time()), c) [1] 13514 > typeof(ifelse(is.na(c),as.Date(Sys.time()),

[Rd] tapply on empty data.frames (PR#10644)

2008-01-27 Thread hilmar . berger
Full_Name: Hilmar Berger Version: 2.4.1/2.6.2alpha OS: WinXP Submission from: (NULL) (84.185.128.110) Hi all, If I use tapply on an empty data.frame I get an error. I'm not quite sure if one can actually expect the function to return with a result. However, the error message suggests that