| mats2line | R Documentation |
Convert 2 matrices to lines
mats2line(mat1, mat2, crs = NA)
mat1 |
Matrix representing origins |
mat2 |
Matrix representing destinations |
crs |
Number representing the coordinate system of the data, e.g. 4326 |
Other lines:
angle_diff(),
geo_toptail(),
is_linepoint(),
line2df(),
line2points(),
line_bearing(),
line_breakup(),
line_midpoint(),
line_segment(),
line_segment1(),
line_via(),
n_segments(),
n_vertices(),
onewaygeo(),
points2line(),
toptail_buff()
m1 <- matrix(c(1, 2, 1, 2), ncol = 2)
m2 <- matrix(c(9, 9, 9, 1), ncol = 2)
l <- mats2line(m1, m2)
class(l)
l
lsf <- sf::st_sf(l, crs = 4326)
class(lsf)
plot(lsf)
# mapview::mapview(lsf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.