Update to modSearchResults function

Previously, the modSearchResults function would return a vector called "BestMethod", but the model methods in this vector appeared in a random order, rather than ranked by their performance in accordance with the numeric stats returned in the "topMetric" vector. These updates to the modSearchResults function return top-performing models in the correct order, with the top-performing model appearing first in the list of models, and with each model method in the BestMethod vector corresponding to the values in the topMetric vector.  The use of ddply has been removed from the first pull request.
Hey Jared,

I updated the code so that ddply is no longer used. The only dependency is
the "stats" package (use of the aggregate() function). Let me know if this
still isn't workable.

-Nate


On Wed, Jul 23, 2014 at 1:57 PM, Jared Knowles <notifications@github.com>
wrote:

> In R/utilities.R:
>
> >      grpvar <- "test"
> >    }
> >    teststats <- df[df$grp == grpvar, ]
> > -  topMetric <- unique(teststats[, dv])[order(-unique(teststats[, "sort"]))][1:n]
> > -  topMetric <- topMetric[!is.na(topMetric)]
> > -  badMetric <- unique(teststats[, dv])[order(unique(teststats[, "sort"]))][1:n]
> > -  bestMethod <- unique(df$method[df[, dv] %in% topMetric])
> > -  worstMethod <- unique(df$method[df[, dv] %in% badMetric])
> > +
> > +  ## Calculate the performance of each individual model and
> > +  ## rank them by that performance.
> > +
> > +  eval(parse(text=paste("temp <- ddply(teststats, .(method), summarize,
>
> Can you do this without the ddply statement? So far I don't think the
> package is dependent on plyr and I'd like to keep it that way if at all
> possible. That said, maybe plyr is already loaded by another package, and
> then I'm not too worried about this.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jknowles/EWStools/pull/25/files#r15311487>.
>