Skip to content
Prev 75520 / 398502 Next

Problem with numeric variable

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

 
  

---- Original message ----
http://www.R-project.org/posting-guide.html
Francisco Torreira
Spanish, Italian and Portuguese
Univ. of Illinois at Urbana-Champaign
707 South Mathews Aven.
4031 FLB
Urbana, IL, 61801