Learn R Programming

heemod (version 0.6.0)

insert: Insert Elements in Vector

Description

Insert a vector in another vector.

Usage

insert(x, pos, what)

Arguments

x
A vector (or a list).
pos
Integer. Insert after which elements?
what
Vector of elements to insert.

Value

A vector.

Details

To insert an element at the beginning use a pos value of 0.

Duplicated positions are not allowed.

Examples

Run this code

heemod:::insert(letters, c(0, 5, 26), c("xxx", "yyy"))

Run the code above in your browser using DataLab