# NOT RUN {
sl <- routes_fast[2:4,]
rnet1 <- overline(sl = sl, attrib = "length")
rnet2 <- overline(sl = sl, attrib = "length", buff_dist = 1)
plot(rnet1, lwd = rnet1$length / mean(rnet1$length))
plot(rnet2, lwd = rnet2$length / mean(rnet2$length))
# }
# NOT RUN {
routes_fast$group = rep(1:3, length.out = nrow(routes_fast))
rnet_grouped = overline(routes_fast, attrib = "length", byvars = "group", buff_dist = 1)
plot(rnet_grouped, col = rnet_grouped$group, lwd =
rnet_grouped$length / mean(rnet_grouped$length) * 3)
# sf methods
sl = routes_fast_sf[2:4, ]
overline(sl = sl, attrib = "length", buff_dist = 10)
rnet_sf = overline(routes_fast_sf, attrib = "length", buff_dist = 10)
plot(rnet_sf$geometry, lwd = rnet_sf$length / mean(rnet_sf$length))
# }
Run the code above in your browser using DataLab