Re: [R] Problem with numeric variable

From: <>
Date: Sun 14 Aug 2005 - 22:16:50 EST

Well, you were right. When I check with str() or summary(), the data frame appears as having a factor for that column. However, if I ask is.factor(C2), I get FALSE, and if I ask is.numeric(C2) I get TRUE. This seems strange. So I decided to reimport the dataframe, this time with NA as undefined values, and not ?. C2 was imported as a numeric variable, as checked with str() and is.numeric(). But I still get the indexes and not the values when I use C2 for any purpose, just as happened before. How can this be possible? All the other columns in the table behave properly. The only difference I see between this columns ans the others is that it contains NA values.

Thanks again,
Francisco Torreira mailing list PLEASE do read the posting guide! Received on Sun Aug 14 22:27:31 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:49 EST