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