add_by_position: Add element to vector by position

View source: R/add_by_position.R

add_by_positionR Documentation

Add element to vector by position

Description

Add element to vector by position

Usage

add_by_position(x, y, i)

Arguments

x

vector

y

new element(s) to add to vector. Must be coercible to type of x

i

numeric scalar. Index where to add new elements. Censored to min = 1 and max = length(x) + 1. Thus to add elements at end of vector use Inf

Examples

add_by_position(LETTERS[1:5], "NEW", 3)


WhiteJP/jpw documentation built on April 17, 2025, 5:47 a.m.