c_topntail: Find the first and last elements of all vectors in a list

Description Usage Arguments Value

View source: R/RcppExports.R

Description

c_topntail returns an 2xN matrix containing the start and end of each of the vectors in the input list. Length 0 vectors are ignored, while length 1 vectors are duplicated

For c_topntail_list, a list of the same length as L having the same elements when their length is <=2 or the first and last elements when length>2.

Usage

1
2
3

Arguments

L

a list containing integer vectors, typically a seglist

Value

For c_topntail an integer matrix. For c_topntail_list a list.


natcpp documentation built on July 13, 2021, 5:09 p.m.