Reputation: 395
I have a dataframe with missing values and I want to use missForest for the imputation of those missing values. However when I run the missForest function with the following call
missForest(xmis = DataWithMarANDMNAR, maxiter = 100, ntree = 50,mtry = floor(sqrt(ncol(DataWithMarANDMNAR))), replace = TRUE, parallelize = c('no', 'variables', 'forests'))
I get the following error
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘predict’ for signature ‘"randomForest"’
I have randomForest package installed, as well as missForest obviously. What is the reason of this error and how can I handle it?
Upvotes: 1
Views: 351
Reputation: 395
OK the issue is that I was using two packages(stat and rrecsys) which shares same function name predict, and when there was a call to predict, the function was calling the predict from rrecsys rather than stat.
Upvotes: 1