converting a data.frame column with as.numeric returns completely different values. I read in a .csv with
data <- read.csv("~/Downloads/data-1.csv")
data$column1 returns decimal values I want to work and which look like the following:
[5509] 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.01 0.13 0.13 0.13 0.13 0.13 0.13
typeof(data$column1)
returns "integer"
class(data$column1)
returns "factor"
But in order to work further with this column I need to convert it into numeric But
as.numeric(data$column1)
returns values like these:
[5509] 14 14 14 14 14 14 14 14 14 14 14 2 14 14 14 14 14 14 14 14 14 14 63 14 14 14 14
Can someone help converting these numbers correctly? Can't figure it out..