Re: [R] MASS fitdistr with plyr or data.table?

From: Justin <jtor14_at_gmail.com>
Date: Wed, 27 Apr 2011 21:29:21 +0000

> require(MASS)
> out <- with(weib.test.too, tapply(wind_speed, site, function(x) fitdistr(x,
> 'weibull')))
> estimates <- t(sapply(out, "[[", 1))
> SDs <- t(sapply(out, "[[", 2))
> estimates
> SDs
>
> HTH,
> Jorge

That'll do nicely and is much more elegant than my current method. I was sure there would be some fancy one liner from plyr though!

Thanks a bunch,
Justin



R-help_at_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. Received on Wed 27 Apr 2011 - 21:44:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Apr 2011 - 22:00:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive