Re: [R] Random Forest Error for Factor to Character column

2013-01-15 Thread Lopez, Dan
Andrew, That did the trick. Thank you. Dan From: Andrew Robinson [mailto:mensuration...@gmail.com] Sent: Monday, January 14, 2013 6:06 PM To: Lopez, Dan Cc: R help (r-help@r-project.org) Subject: Re: [R] Random Forest Error for Factor to Character column After you subset the data, did you

Re: [R] Random Forest Error for Factor to Character column

2013-01-14 Thread Andrew Robinson
After you subset the data, did you redeclare the factor? If not then R still thinks it has the potential for all those levels. TRAINSET$JOBTITLE <- factor(TRAINSET$JOBTITLE) I hope this helps Andrew On Tuesday, January 15, 2013, Lopez, Dan wrote: > Hi, > > Can someone please offer me some guid

[R] Random Forest Error for Factor to Character column

2013-01-14 Thread Lopez, Dan
Hi, Can someone please offer me some guidance? I imported some data. One of the columns called "JOBTITLE" when imported was imported as a factor column with 416 levels. I subset the data in such a way that only 4 levels have data in "JOBTITLE" and tried running randomForest but it complained a