cut: cut

Description Usage Arguments Details Value Author(s) Examples

View source: R/listprocessor.R

Description

Cut or slice a list data type from start index to end index

Usage

1
cut(lst, start = NULL, end = NULL)

Arguments

lst

the list from which the elements are returned

start

the start index (default: 1st index)

end

the end index (default: length of list)

Details

Retrieve elements from start index to end index. If start is not supplied, it will be assumed to be the 1st index. If end is not supplied then, all elements up to the end will be returned.

Value

all elements within the specified range

Author(s)

Jay Morgan

Examples

1
2
3
4
5
6
## Not run: 
(cut {1 2 3 4} 1 2) => list(1, 2)
(cut {1 2 3 4} :start 2) => list(2, 3, 4)
(cut {1 2 3 4} :end 3) => list(1, 2, 3)

## End(Not run)

jaypmorgan/slurp documentation built on Dec. 20, 2021, 10 p.m.