topepo/caret — pull request #58 by pgramme (2014-10-07 10:09:38+00:00)
Title: preProcess: make medianImpute work with data matrix as well as data frames

Hi

I had a bug with preProcess used on matrix rather than data.frame. This small patch solves the problem.

I also moved the call `x <- x[complete.cases(x),,drop = FALSE]` after the implementation of medianImpute in preProcess. Although this step was not necessary (and it introduces a small backwards incompatibility), I think this makes more sense. Also discussed there: http://stackoverflow.com/questions/25012697/medianimpute-not-working-for-carets-preprocess-method

The doc already specified that each predictor was treated independently, so no need to update

And above all, thanks for the package, it is really useful!

Pierre

NB: the element `dim` of the output is always the dimension of complete cases. Is it meant? I find it a bit confusing