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

From: <David.Duffy_at_qimr.edu.au>
Date: Wed, 21 May 2008 10:05:09 +0200 (CEST)


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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 21 May 2008 - 17:03:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 28 May 2008 - 14:31:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive