Closed gavinsimpson closed 11 years ago
Thanks (and thanks for all the pushes lately!), I agree, I think the reason it wound up this way was because I was having problems with getting melt
and recast
to return an object that looked the way I wanted it. In part it's an issue around my familiarity (or lack of it) with the reshape2
package. I'll work on it.
@SimonGoring I was looking at another issue with get_download()
and implemented a dcast()
solution to this issue whilst I was at it. The issue I was looking at was the two plyr calls that create sample.data
in long format. These two calls are quite slow - plyr is known for its user-friendliness, not its speed - and can be replaced with some equivalent base R calls, essentially using do.call()
and rbind.data.frame()
.
I'll issue a pull request for the issue21 branch in my fork so you can see what I have been doing.
get_download()
crosstabs the downloaded data withxtabs()
and returns this as componentcount.table
via the following codeAn object of class
"xtabs"
isn't that useful though; invariably one would want a data frame or a matrix, but it is somewhat tedious to convert and"xtabs"
object to either of these more useful classes.Propose that
get_download()
returns componentcount.table
as a matrix or a data frame.This would involve a
cast()
usingacast()
ordcast()
instead of the current use ofxtabs()
.