I have a dataset that kind a looks like this:
head(data)
spotify_id                   title_song               code   genre  subgenre        artiest acousticness  valence   energy danceability instrumentallness  speechiness id
 1 spotify:track:30ZGbfPsjDNCgL21Qz                   Summertime  TRBIMVX144D110CA63 country tennessee Kenny Chesney     0.213743 0.705857  0.934522     0.479442    0.000000111572   0.0995011  1
I need to subtract one the columns so there I want to make sure the values are numberic. Right now the column I need is a vector:
 class(data$acousticness)
 [1] "factor"
Thing is that when I do this:
 data$acousticness <- as.integer(data$acousticness)
 class(data$acousticness)
 [1] "integer"
I get the following values:
  head(data$energy) 
  [1] 5188 3674 4653 4272 3883 1774
Thats way different then the values before (5188 in stead of 0.21...). Any thoughts on what goes wrong here?
