nseg: Number of segments

nsegR Documentation

Number of segments

Description

Count the number of segments in a SpatVector of lines or polygons

Usage

## S4 method for signature 'SpatVector'
nseg(x)

Arguments

x

SpatVector

Value

numeric

Examples

f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
nseg(v)

terra documentation built on Aug. 22, 2026, 5:07 p.m.