[R] Problem with numeric variable

ftorrei2@uiuc.edu ftorrei2 at uiuc.edu
Sat Aug 13 22:11:58 CEST 2005


Hello all,

I posted a question some days ago without getting any answers,
perhaps, as one of you kindly pointed out, because the
question was not clearly stated. Let me reformulate it:
In a frame, a column named C2 represents a numeric variable
(checked with is.numeric(C2)). Some rows in the frame have an
undefined value for C2, represented in the table by a ? sign.
The remaining rows have numeric values with 2 decimals. For
example, row 10 has 43.70 for C2, while row 1 has ?. The
problem is that when I list C2 values (or when I try to plot
them, etc), these values are not the ones that appeared in the
table. Below are the first 3 lines of what I get when I list C2:
> C2
[1] 43 47 96 62 87 55 1 98 121 1 1 1 67 1 112 1 93 44
[19] 85 569 52 110 126 95 92 60 36 383 373 298 274 406 208 175
293 306
[37] 305 172 134 115 94 84 104 99 64 271 269 310 268 359 443
248 204 345

These are not the correct values for C2, and I guess that they
are just row numbers. How can I get the correct C2 values
ready for analysis? Is this problem related to the fact that
some rows have a ? value for C2?

Thanks in advance,
Francisco Torreira
Francisco Torreira
Spanish, Italian and Portuguese
Univ. of Illinois at Urbana-Champaign
707 South Mathews Aven.
4031 FLB
Urbana, IL, 61801




More information about the R-help mailing list