I looked it up online of how to deal with as.numeric on my wt (which I used read.csv on). The result is as follows:
wt
[1] 152,821 155,707 159,443 160,053 163,741 164,760 164,131 167,405
[9] 168,672 171,287 172,307 175,223 178,692 179,006 182,528 183,740
[17] 185,733 190,345 193,160 197,016 198,741 199,156 203,282 203,160
[25] 204,713 208,934 208,549 212,262 214,493 215,055 219,398 222,575
[33] 227,677 226,194 228,596 231,269 228,231 229,957 234,569 236,630
[41] 236,042 244,430 249,943 255,117 256,049 262,624 264,564 270,634
...
However, after applying as.numeric(): I will get
wt
[1] 2 3 4 5 6 8 7 9 10 11 12 13 14 15 16 17 18
[18] 19 20 21 22 23 25 24 26 28 27 29 30 31 32 33 35 34
[35] 37 39 36 38 40 42 41 43 44 45 46 47 48 49 50 51 52
[52] 53 55 56 57 54 58 59 60 62 61 63 64 67 66 65 68 69
[69] 70 71 72 73 74 75 76 78 81 79 85 89 91 90 86 87 83
....
If I use as.numeric(as.character(wt)) or the one with levels, then I will get NAs by coercion. Is there any other way to solve this? Thanks!