Convert data frame to spatial lines data frame in R with x,y x,y coordintates
问题 I have a data frame in R, one of the columns contains the coordinates for points along a line in the form: x,y x,y x,y x,y So the whole data frame looks like id dist speed coord 1 45 6 1.294832,54.610240 -1.294883,54.610080 -1.294262,54.6482757 2 23 34 2.788732,34.787940 6.294883,24.567080 -5.564262,-45.7676757 I would like to convert this to a spatial lines data frame, and I assume that the fist step would be to separate the coordinates into two columns in the from: x, x, x, x y, y, y, y But