I came across this problem: I have a data frame that I am trying to separate in two column.
[1]
[1] 120.3,1860
[2] 130.6,1861
I tried to separate them with the following line of code:
df.tidy <- separate(df.comma.separated, 1, "" , sep = ",", remove = FALSE, convert = TRUE)
Give me the following output:
[1] [2]
[1] 120.3,1860 1860
[2] 130.6,1861 1861
How do I get rid of the ",1860" and the ",1861" from the input value? Thank you for your help.