This is just a quick, incomplete response, but the main misconception is really
the use of data.frames. If you don't use the elaborate mechanics of data frames
that involve the management of row names, then they are definitely the wrong
tool to use, because most of the overhead is exactly to man
I don't have anything to suggest on your specific example but perhaps
these two notes are relevant.
1. As is mentioned in the documentation, it's generally a bad idea to
write S4 initialize() methods for reference classes, rather than
reference class methods for $initialize():
"a reference m
Dear R developers: R is supposed to be slow for iterative
calculations. actually, it isn't. matrix operations are fast. it is
data frame operations that are slow.
R <- 1000
C <- 1000
example <- function(m) {
cat("rows: "); cat(system.time( for (r in 1:R) m[r,20] <-
sqrt(abs(m[r,20])) + rnorm
I've been finding that the "loose ends" in many of these older codes cause more
trouble
than it is worth in their use. When I encounter them, I've attempted to
re-program the
algorithm in R. A lot of the Fortran code is because of the software structure
the author
used and nothing to do with the
On Jul 2, 2011, at 12:02 , Duncan Murdoch wrote:
> On 11-07-01 4:13 PM, Mohit Dayal wrote:
>> Dear R-programmers,
>>
>> I would like to use one of the AS Algorithms that used to be published in
>> the journal Applied Statistics of the Royal Statistical Society (Series C).
>> FORTRAN code based o
On 11-07-01 4:13 PM, Mohit Dayal wrote:
Dear R-programmers,
I would like to use one of the AS Algorithms that used to be published in
the journal Applied Statistics of the Royal Statistical Society (Series C).
FORTRAN code based on these are available on the Statlib website at
http://lib.stat.c