Johannes, please try the latest version on R-forge (1.4). That error
has been fixed, and it's much faster. We hope to have that to CRAN
reasonably soon.
To install, use:
install.packages("data.table",repos="http://R-Forge.R-project.org";)
- Tom
Tom Short
On Thu
t;])
user system elapsed
0.17 0.000.17
- Tom
On Wed, Apr 7, 2010 at 3:46 PM, Tom Short wrote:
> Here's how I would have done the data.table method. It's a bit faster
> than the ave approach on my machine:
>
>> # install.packages("data.table",repos=&qu
- f3(frame)) # data.table
user system elapsed
0.250.010.30
- Tom
Tom Short
On Wed, Apr 7, 2010 at 12:46 PM, Dimitri Liakhovitski wrote:
> I would like to thank once more everyone who helped me with this question.
> I compared the speed for different approaches. Below are t
(the last time
I looked anyway). To get interactivity, the RApache approach requires
a fair amount of javascript programming. Rpad gives you interactivity
fairly automatically as a webpage with embedded R code.
- Tom
Tom Short
On Tue, Mar 23, 2010 at 4:46 PM, Erich Neuwirth
wrote:
>
SE] (the answer is a list, not a vector).
Normally, it's easier to use [[]] or $ indexing to get this. Also,
fname[i,j] <- something assignment is still a bit buggy for
data.tables.
- Tom
Tom Short
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
I'm sorry, Rob, but that code is dense enough and formatted badly
enough that it's hard to dig through.
You may want to try the data.table package. The development version on
R-forge is pretty fast for grouping operations like this. I'm not sure
if this is what you're really after. It's hard to te
On Thu, Feb 25, 2010 at 4:10 AM, Heym, Peter-Paul wrote:
> this works fine but it is very slow (since A and B can be very large and I
> have to repeat this about 5000 times). I would like to make this faster using
> e.g. apply or lapply but I didn't get it work using these methods. Does
> anybody
Try this:
a <- b <- read.table(textConnection("
1 + name1 1 2 3
2 + name2 5 9 10
2 - name3 56 74 93
1 - name4 65 75 98"), skip=1, header=FALSE)
swapidx <- with(a, (V1 == 2 & V2 == "+") | (V1 == 1 & V2 == "-"))
b[swapidx,] <- b[swapidx, c(1:3,6:4)]
This creates an indexing vector that identifies
If you need more aggregations on the stock (I assume that's what the
first column is), I'd use the data.table package. It allows fast
indexing and merge operations. That's handy if you have other features
of a stock (like company size or industry sector) that you'd like to
include in the aggregatio
On Fri, Jul 31, 2009 at 8:49 AM, Rainer M Krug wrote:
> My question: how can I get the filename of the pdf from the device
> before it is closed?
I've also looked for this and couldn't find a way. I had a similar
use, where I wanted to get an R transcript with embedded plots in
emacs (see prettyR
example), and more.
To create HTML, you have several packages that can help you out:
R2HTML, Rpad, hwriter, and xtable. Not everything might convert
properly, so you may have to experiment. Data frames as tables
normally convert nicely.
- Tom
Tom Short
Another tool I find useful is Matthew Dowle's data.table package. It
has very fast indexing, can have much lower memory requirements than a
data frame, and has some built-in data manipulation capability.
Especially with a 64-bit OS, you can use this to keep things in memory
where you otherwise woul
12 matches
Mail list logo