This is my dataframe:
df <- data.frame(ID = rep(1:100, each = 2), x =runif(200, 10, 90), y = runif(200, 10, 90))
For each ID I need to create SpatialLines, I haven't had good luck.
I think I have to split the dataframe and then transform to Lines class and after that the SpatialLines using the splited dataframe. All that using inside of a apply function. Am I right? How would you do it?
No comments:
Post a Comment