Skip to content
Prev 22460 / 398502 Next

Forcing integers to be nominal

On Wed, 7 Aug 2002, Tim Wilson wrote:

            
What you mean is that you want YearColl to be a factor and so coded.
as.factor() will help.

R has no idea what you meant: you gave it an integer variable, and it
handled it as such.  Don't be surprised if R does as it is told.