Skip to content
Prev 169439 / 398506 Next

subset problem (reducing from six to two levels)

On Thu, Feb 05, 2009 at 01:01:59PM -0800, Ine wrote:
One solution is to have the factors re-built after subsetting:

foo = factor(c('a','a','b','c','c'))

# unused levels persistent:
[1] a a
Levels: a b c

# but:
[1] a a
Levels: a

cu
	Philipp