trim_vec: Trim the tailing zeroes from a long vector

View source: R/dynamic.R

trim_vecR Documentation

Trim the tailing zeroes from a long vector

Description

Trim the tailing zeroes from a long vector

Usage

trim_vec(vec)

Arguments

vec

Vector. Final elements may be zero.

Value

A vector whose length is shorter than the original, if there were trailing zero elements

Examples

trim_vec(c(1:10, rep(0,3)))

dynamicpv documentation built on Jan. 16, 2026, 1:07 a.m.