[Rd] table(factor(x), exclude=NULL) (PR#11494)

David.Duffy at qimr.edu.au David.Duffy at qimr.edu.au
Wed May 21 10:05:09 CEST 2008


Hi. I don't know if this a bug or just annoying to me:

> x <- c(1,2,3,NA)

> table(x, exclude=NULL)
x
    1    2    3 <NA>
    1    1    1    1

> table(factor(x), exclude=NULL)

1 2 3
1 1 1

I don't think many people use factor(x, exclude=NULL): it is not the 
default handling of character data by read.table().

Cheers, David Duffy.

-- 
| David Duffy (MBBS PhD)                                         ,-_|\
| email: davidD at qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
| Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v



More information about the R-devel mailing list