insertvec: Insert a set of values in a vector

Description Usage Arguments Details Value Author(s) Examples

View source: R/insertvec.R

Description

Inserting values in a vector at specific index locations

Usage

1
insertvec(v, ind, val)

Arguments

v

vector

ind

ndex locations where val is inserted

val

some vector of insertion, maybe NA

Details

The vector is parsed out and val values are inserted where after the index values provided.

Value

v

new vector with val inserted after the index

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

Examples

1
2
3
  x = 1:20

 insertvec(x, c(4,17) , NA)

GEOmap documentation built on May 2, 2019, 8:56 a.m.