Skip to content
Prev 5152 / 29559 Next

Using a mask

On Fri, 27 Feb 2009, Ned Horning wrote:

            
It looks as though setting the values to NA will work. In the 
predict.randomForest example, do:

df <- iris[ind == 2,]
is.na(df[1:10, 1:2]) <- TRUE
predict(iris.rf, df)

So setting the 0 values to NA might get you the results you want, 
maintaining the relative order of the observations.

Roger