Re: [Rd] function call overhead

2011-02-16 Thread Olaf Mersmann
.time(replicate(1e4, print)) User System verstrichen 0.011 0.001 0.014 are skewed by the overhead of replicate() in this case because the execution time of the expression under test is so short. Cheers, Olaf Mersmann __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Possible bug in R parser

2011-01-24 Thread Olaf Mersmann
r R 2.12.1 on both OS X and Linux. Is this expected behavior? Cheers, Olaf Mersmann __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] list comprehension to create an arbitrary-sized list with arbitrary names/values

2010-10-13 Thread Olaf Mersmann
Hi, On 13.10.2010, at 21:26, Steve Kim wrote: > mydict = dict([(keyfun(x), valfun(x)) for x in mylist]) > > to create a dictionary with whatever keys and values we want from an > input list of arbitrary size. In R, I want to similarly create a list > with names/values that are generated by some k

Re: [Rd] tabulate() does not check for input bounds

2010-10-03 Thread Olaf Mersmann
Dear Simone, On 04.10.2010, at 01:01, Simone Giannerini wrote: > it looks like that tabulate() does not check for the bounds of the input. > Reproducible example: > >> b <- 1:2 >> tabulate(b[1:100]) > [1] 1 1 this looks perfectly reasonable. Consider the result of > b <- 1:2 > b[1:100] [1]

[Rd] Speed improvement for Find() and Position()

2010-09-01 Thread Olaf Mersmann
ser=20.502 system= 0.404 Cheers, Olaf Mersmann __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Surprising behavior of Negate()

2010-08-29 Thread Olaf Mersmann
- match.fun(f) function(...) !f(...) } This matches 'f' when Negate() is called and not the first time the return value is used. If the current behavior is desired, maybe a note in the documentation could be added to clarify this peculiarity. Cheers, Olaf Mersmann ___

Re: [Rd] transpose of complex matrices in R

2010-07-30 Thread Olaf Mersmann
Hi, On 30.07.2010, at 11:35, Robin Hankin wrote: > 3. Try to define a t.complex() function: > t.complex <- function(x){t(Conj(x))} > (also fails because of recursion) Try this version: t.complex <- function(x) { xx <- Conj(x) .Internal(t.default(xx)) } You get infinite recursion in

Re: [Rd] Attributes of 1st argument in ...

2010-07-03 Thread Olaf Mersmann
Hi Daniel, On 02.07.2010, at 23:26, Daniel Murphy wrote: > I am trying to get an attribute of the first argument in a call to a > function whose formal arguments consist of dots only and do something, e.g., > call 'cbind', based on the attribute > f<- function(...) {get first attribute; maybe or m

Re: [Rd] Attributes of 1st argument in ...

2010-07-02 Thread Olaf Mersmann
Hi Daniel, On 02.07.2010, at 23:26, Daniel Murphy wrote: > I am trying to get an attribute of the first argument in a call to a > function whose formal arguments consist of dots only and do something, e.g., > call 'cbind', based on the attribute > f<- function(...) {get first attribute; maybe or m

[Rd] Bug in memDecompress()

2010-05-07 Thread Olaf Mersmann
Dear R developers, I have discovered a bug in the implementation of lzma decompression in memDecompress(). It is only triggered if the uncompressed size of the content is more than 3 times as large as the compressed content. Here's a simple example to reproduce it: n <- 200 char <- past

[Rd] Fix for incorrect use of restrict in xz third party code

2010-02-19 Thread Olaf Mersmann
uble of patching the sources instead of waiting for a new release. If anyone wants to apply a fix, I have prepared a patch with all the changes which can be found here http://www.statistik.tu-dortmund.de/~olafm/temp/xz_restrict.patch Cheers, Olaf Mersmann

[Rd] Small documentation fix for [.data.frame

2010-02-19 Thread Olaf Mersmann
correct number of rows, and replicates it if necessary. ... A trivial patch changing this is can be found here: http://www.statistik.tu-dortmund.de/~olafm/temp/edf_doc.patch Cheers, Olaf Mersmann __ R-devel@r-project.org mailing list https

Re: [Rd] Using svSocket with data.table

2009-07-25 Thread Olaf Mersmann
Hi Matthew, Excerpts from Matthew Dowle's message of Sat Jul 25 09:07:44 +0200 2009: > So I'm looking to do the same as the demo, but with a binary socket. Does > anyone have any ideas? I've looked a bit at Rserve, bigmemory, biocep, nws > but although all those packages are great, I didn't

Re: [Rd] Improvement of [dpq]wilcox functions

2009-07-22 Thread Olaf Mersmann
uses your patch would be interesting since it is indeed quite a bit faster than the current implementation. Cheers, Olaf Mersmann __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] model.matrix memory problem (PR#13838)

2009-07-17 Thread Olaf Mersmann
1784 - 1798 of src/main/model.c. What happens is that 'k' overflows (signed int). That means k is 0 after the loop an nc is set to 0. That means the allocated model matrix 'x' is too small which results in the observed segfault. I can prov

Re: [Rd] Logical Error? (PR#13516)

2009-02-10 Thread Olaf Mersmann
ter. This is not a bug, it's due to the limited precision of floating point numbers. Sincerely Olaf Mersmann __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Patch to fix small bug in do_External and do_dotcall

2008-12-28 Thread Olaf Mersmann
;, the buffer holding the function name would never be filled. I'm not sure how to deal with this corner case. One option would be to copy some (un)descriptive like '' into the buffer. If this is acceptable I can add it and post a revised patch. Greetings from Dortmund Olaf Mersman

Re: [Rd] Patch to fix small bug in do_External and do_dotcall

2008-12-26 Thread Olaf Mersmann
Excerpts from Prof Brian Ripley's message of Sat Dec 27 06:59:24 +0100 2008: > Thank you, but can we see the patch please (no attachement arrived)? I've posted them online: http://www.statistik.tu-dortmund.de/~olafm/files/symname-bug.R http://www.statistik.tu-dortmund.de/~olafm/files/symname-

[Rd] Patch to fix small bug in do_External and do_dotcall

2008-12-26 Thread Olaf Mersmann
I've stumbled upon a small bug/inconsitency in do_External and do_dotcall: Here's an example: % LC_ALL=C R --vanilla < symname-bug.R R version 2.8.0 (2008-10-20) *snip* > options(error=expression(0)) > ## Call 'R_GD_nullDevice' with incorrect parameter count: > .Call("R_GD_nullD

[Rd] DTrace probes for R

2008-12-18 Thread Olaf Mersmann
be useful / interesting from a developers standpoint. Greetings from Dortmund, Olaf Mersmann [1] http://www.sun.com/bigadmin/content/dtrace/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel