I have a data.frame with a column called weight in a factor format, and I have these values:
Weight
8.248
5.365333333333333
5.725333333333337
and I need to convert this to a numeric value, with the same values, only changing the format.
But, when I do this using this code:
dt$New.weight=as.numeric(dt$Weight)
and I get this data.frame:
Weight New.weight
8.248 2547
5.365333333333333 871
5.725333333333337 958
What I'm doing wrong?