View source: R/point_to_line.R
point_to_line | R Documentation |
Allows converting data.frame with coordinates of points into sf with coordinates of line.
point_to_line(
data = NULL,
col_long = "long",
col_lat = "lat",
crs_proj = "+proj=longlat +datum=WGS84"
)
data |
Data frame containing coordinates of points to convert to lines |
col_long |
String containing the name of the column containing the longitude |
col_lat |
String containing the name of the column containing the latitude |
crs_proj |
String containing the proj4string |
returns a sf object with coordinates of line.
path.file.ex <- base::system.file("extdata", "df_gps.csv", package = "gps.track")
df.gps <- read.table(path.file.ex,h=TRUE)
df.gps.line <-
point_to_line(
data = df.gps,
col_long = "long",
col_lat = "lat",
crs_proj = "+proj=longlat +datum=WGS84"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.