On 10/06/2011 08:03 AM, Alaios wrote: > Dear all, > I would like to use the following function > > fitdist(data, distr, method=c("mle", "mme", "qme", "mge"), > start=NULL, fix.arg=NULL, ...) > > > for many different distr values like distr=c("norm","lnorm","pois") (just a > small example) > and take back into a list the parameter name which is what is inside distr > plus what the function fitdist returns (another list). > > How can I do that ? > > > B.R > Alex > > [[alternative HTML version deleted]] > > > > ______________________________________________ > 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.
Hi, Take a look at 'expand.grid' and 'ddply' from the plyr package or foreach from the foreach package. cheers, Paul -- Paul Hiemstra, Ph.D. Global Climate Division Royal Netherlands Meteorological Institute (KNMI) Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39 P.O. Box 201 | 3730 AE | De Bilt tel: +31 30 2206 494 http://intamap.geo.uu.nl/~paul http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770 [[alternative HTML version deleted]] ______________________________________________ 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.