split_at: split_at

Description Usage Arguments Details Value Examples

View source: R/split_at.R

Description

Split vector

Usage

1
split_at(x, pos)

Arguments

x

vector with positions to split.

Details

Split vector at position(s). Returns a list with all elements before and after the split position.

Value

list

Examples

1
2
3
set.seed(42)
x <- sample(x = 1:10, size = 5)
split_at(x = x, pos = 3)

onpoint documentation built on Sept. 9, 2021, 9:07 a.m.

Related to split_at in onpoint...