Re: [Rd] factor(x, exclude=y) if x is a factor

2012-12-09 Thread Suharto Anggono Suharto Anggono
2 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base --- On Thu, 6/12/12, Lorenz, David wrote: From: Lorenz, Da

Re: [Rd] factor(x, exclude=y) if x is a factor

2012-12-06 Thread Lorenz, David
Suharto, I think that the key is to read the definition of exclude in the Arguments section: a vector of values to be excluded when forming the set of levels. This should be of the same type as x, and will be coerced if necessary. Because the levels already exist for x as a factor, they are n

[Rd] factor(x, exclude=y) if x is a factor

2012-12-05 Thread Suharto Anggono Suharto Anggono
I found this part in the documentation of 'factor'. 'factor(x, exclude=NULL)' applied to a factor is a no-operation unless there are unused levels: in that case, a factor with the reduced level set is returned. If 'exclude' is used it should also be a factor with the same leve