Re: [Rd] Speed difference between df$a[1] and df[1,"a"]

2011-10-20 Thread Allan Engelhardt
`$` and `[` are primitives while `[.data.frame` is a longish R function that does all sorts of clever things. On 19/10/11 22:34, Stavros Macrakis wrote: I was surprised to find that df$a[1] is an order of magnitude faster than df[1,"a"]: df<- data.frame(a=1:10) system.time(replicate(10, d

[Rd] sessionInfo() and byte compiler

2011-04-18 Thread Allan Engelhardt
For troubleshooting purposes, should utils::sessionInfo() show if the attached packages (especially base packages) are byte compiled (with make bytecode and/or R_COMPILE_PKGS set and not zero)? Allan __ R-devel@r-project.org mailing list https://stat

Re: [Rd] Consistency of variable storage in R and Sys.setlocale (is this a feature or bug)?

2010-12-15 Thread Allan Engelhardt
You are not saying which platform you are working on but my guess would be that the two locales have different character encodings. Try specifying the encoding explicitly in the format that is right for your platform; when I try to replicate your examples using Sys.setlocale("LC_ALL", "he_IL.u

Re: [Rd] R with multiple processors

2010-08-31 Thread Allan Engelhardt
Maybe you can use the same approach as the pnmath library which replaces many of the math functions with pthreads enabled ones when it is loaded? That way people have a choice, and those who like to do things like doMC() and therefore want to keep the core R single-threaded can still do so.

Re: [Rd] Can you share a working example of R program aided by fast BLAS?

2010-08-26 Thread Allan Engelhardt
On 19/08/10 19:49, Paul Johnson wrote: Can one of you give me an R program that displays the benefits an accelerated BLAS in R? I thought the standard benchmark was (the somewhat artificial) R-benchmark-25.R from http://r.research.att.com/benchmarks/R-benchmark-25.R . I have some exampl