points_to_linestring: Given a dataframe of trajectory points, create a linestring...

View source: R/points_to_linestring.R

points_to_linestringR Documentation

Given a dataframe of trajectory points, create a linestring for each trajectory

Description

Given a dataframe of trajectory points, create a linestring for each trajectory

Usage

points_to_linestring(df, group, lng, lat, crs = 4326)

Arguments

df

A dataframe containing point observations to be converted into linestrings.

group

The bare (unquoted) column from df for the grouping variable.

lng

The bare (unquoted) column of df containing longitude (only required if df does not have a geometry column).

lat

The bare (unquoted) column of df containing latitude (only required if df does not have a geometry column).

crs

The coordinate reference system (CRS) for the data.

Value

A dataframe with one linestring for each group in df


DrivePlotR documentation built on Nov. 22, 2026, 5:06 p.m.