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
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)
> ---
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
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