[Rd] table( , exclude=NULL) for factor objects

kjetil brinchmann halvorsen kjetil at entelnet.bo
Sat Jun 7 12:11:37 MEST 2003


The NEWS file for R-1.7.0 says:

	table() now allows exclude= with factor arguments (requested by
	Michael Friendly).

But in a recent R-1.7.1beta:

> test <- c(1,2,3,4,5,1,2,3,4,5,NA,NA,1,2,3,4,5)
> table(test)
test
1 2 3 4 5 
3 3 3 3 3 
> table(test, exclude=NULL)
test
   1    2    3    4    5 <NA> 
   3    3    3    3    3    2 
> table( as.factor(test), exclude=NULL)

1 2 3 4 5 
3 3 3 3 3 


so this seems not to work?

What is strange is that this seems to work in 
example(table).

Kjetil Halvorsen



More information about the R-devel mailing list