## Not run:
# data(flow) # load data frame of od flows between zones
# data(cents) # load centroids data
# newflowlines <- od2line(flow = flow, zones = cents)
# newflowlines2 <- od2line2(flow = flow, zones = cents)
# sp::plot(cents)
# lines(newflowlines, lwd = 3)
# lines(newflowlines2, col = "white")
# nfl_sldf <- SpatialLinesDataFrame(newflowlines, flow, match.ID = FALSE)
# identical(nfl_sldf, newflowlines)
# ## End(Not run)
Run the code above in your browser using DataLab