[R] Factor function
izahn at psych.rochester.edu
Mon Apr 25 22:22:44 CEST 2011
NA != "NA"
The first represents a missing observation, the second represents a
On Mon, Apr 25, 2011 at 3:53 PM, Lisa <lisajca at gmail.com> wrote:
> Dear All,
> I just want to remove “NA” from the levels of a factor. For example:
> ncol=3, byrow=TRUE))
>> factor(d[, 3], exclude=NA)
>  xx yy NA
> Levels: NA xx yy
> But “NA” is still listed in the levels. How can I solve this problem? Thanks
> in advance.
> 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.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
University of Rochester
Department of Clinical and Social Psychology
More information about the R-help