From David.Duffy at qimr.edu.au  Wed May 21 10:05:09 2008
From: David.Duffy at qimr.edu.au (David.Duffy at qimr.edu.au)
Date: Wed, 21 May 2008 10:05:09 +0200 (CEST)
Subject: [Rd] table(factor(x), exclude=NULL) (PR#11494)
Message-ID: <20080521080509.A3D54282EFF6@mail.pubhealth.ku.dk>

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



[Rd] table(factor(x), exclude=NULL) (PR#11494)
David.Duffy at qimr.edu.au