[R] NA in R package randomForest

Weidong Gu anopheles123 at gmail.com
Mon Mar 26 14:50:08 CEST 2012


Your data set probably has character variables. You can transform them
into factors before running na.roughfix.

Weidong Gu

On Mon, Mar 26, 2012 at 8:17 AM, silje skår <silje.skr at gmail.com> wrote:
> I have a question regarding NA in randomForest (in R). I have a dataset
> which include both numerical and non-numerical variables, and the data
> includes some NA. I tried to use na.roughfix but then i get an error
> message "na.roughfix only works for numeric or factor". I also tried
> rfImpute but this does not work either because I have some NA in my
> response variable. Does anyone have som tips to how I can deal with this?
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list