Skip to contents

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

Examples

l <- routes_fast_sf
n_vertices(l)
#>  [1]  53  97  37  41  73 104  53  44  59  79  97 121  98  65  64  84 114 131  44
#> [20]  59  55  22  52  64  46  79  75  22  27  65  70  87 105  52  27  46 114 126
#> [39] 130  69  65  46
n_vertices(zones_sf)
#> [1] 6 8 8 9 7 6 8 7