Skip to content
Back to formatted view

Raw Message

Message-ID: <1303761220026-3473984.post@n4.nabble.com>
Date: 2011-04-25T19:53:40Z
From: Lisa
Subject: Factor function

Dear All,

I just want to remove ?NA? from the levels of a factor.  For example:

d<-data.frame(matrix(c("ww","ww","xx","yy","ww","yy","xx","yy","NA"),
ncol=3, byrow=TRUE))

> factor(d[, 3], exclude=NA)
[1] xx yy NA
Levels: NA xx yy

But ?NA? is still listed in the levels. How can I solve this problem? Thanks
in advance.

Lisa


--
View this message in context: http://r.789695.n4.nabble.com/Factor-function-tp3473984p3473984.html
Sent from the R help mailing list archive at Nabble.com.