On 9/15/2009 4:24 PM, ivo welch wrote:
hi david---no, this time I actually know what I was asking ( ;-) ).   I do
need speed computed on many data sets, each of which is created by a "by"
statement.  so, no iterative programming on my side.

thanks, hadley for the pointer to .row_names_info() in lieu of dim() or
nrows().  I don't seem to understand the second (type) argument, despite
reading the docs, but all of them are giving the same answer in my data
frames.  so, I guess I will stick to "2" for the time being.


One note: if you're worried about speed, it almost always makes sense to use matrices rather than dataframes. If you've got mixed types this is tedious and error-prone (each type needs to be in a separate matrix), but if your data is all numeric, it's very simple, and will make things a lot faster.

Duncan Murdoch

______________________________________________
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.

Reply via email to