Re: [R] How to include NA's of a factor in table?

2006-07-10 Thread Heinz Tuechler
Thank you Jacques and Gabor! Your solution does work and it led me to try also: table(factor(fcv, exclude=NULL)) # shows a, c, NA Greetings, Heinz At 08:34 10.07.2006 -0400, Gabor Grothendieck wrote: >If we specify exclude=NULL in factor then it need not also be >specified in table: > >fcv

Re: [R] How to include NA's of a factor in table?

2006-07-10 Thread Gabor Grothendieck
If we specify exclude=NULL in factor then it need not also be specified in table: fcv <- factor(c('a', NA, 'c'), exclude=NULL) table(fcv) On 7/10/06, Jacques VESLOT <[EMAIL PROTECTED]> wrote: > fcv <- factor(c('a', NA, 'c'), exclude=NULL) > table(fcv, exclude=NULL) > ---

Re: [R] How to include NA's of a factor in table?

2006-07-10 Thread Jacques VESLOT
fcv <- factor(c('a', NA, 'c'), exclude=NULL) table(fcv, exclude=NULL) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33 (0)3.20.87.10.31 ht

[R] How to include NA's of a factor in table?

2006-07-10 Thread Heinz Tuechler
Dear All, Is there a better way to include NA's of a factor in the output of table() than using as.character()? Admittedly, I do not understand the help page for table concerning the exclude argument applied to factors. I tried in different ways, but could not get NA to be included in the table, i