Learn R Programming

stplanr (version 1.2.2)

n_vertices: Retrieve the number of vertices in sf objects

Description

Returns a vector of the same length as the number of sf objects.

Usage

n_vertices(l)

Arguments

l

An sf object with LINESTRING geometry

See Also

Other lines: angle_diff(), geo_toptail(), is_linepoint(), line2df(), line2points(), line_bearing(), line_breakup(), line_midpoint(), line_segment(), line_segment1(), line_via(), mats2line(), n_segments(), onewaygeo(), points2line(), toptail_buff()

Examples

Run this code
l <- routes_fast_sf
n_vertices(l)
n_vertices(zones_sf)

Run the code above in your browser using DataLab