I’d like to separate the first column into two with separator being a dot.
Here is the data frame:
`V1 V2
1 01.01 1.5
2 01.02 2.3
3 01.03 4
4 01.04 1.7`
Here is my code:
separate(df4, col = 1, into = c("x","y"), sep = ".")
Here is the warning message:
Expected 2 pieces. Additional pieces discarded in 4 rows [1, 2, 3, 4].
Here is my code:
separate(df4, col = 1, into = c("x","y"), sep = ".")
And the resulting table looks as follows:
x y V2
1.5
2.3
4
1.7
The warning message: Expected 2 pieces. Additional pieces discarded in 4 rows [1, 2, 3, 4].