Learn R Programming

onpoint (version 1.1)

split_at: split_at

Description

Split vector

Usage

split_at(x, pos)

Value

list

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.

Examples

Run this code
if (FALSE) {
set.seed(42)
x <- sample(x = 1:10, size = 5)
split_at(x = x, pos = 3)
}

Run the code above in your browser using DataLab