Learn R Programming

GEOmap (version 2.5-11)

insertNA: Insert NA in a vector

Description

Inserting NA values in a vector at specific index locations

Usage

insertNA(y, ind)

Value

v

new vector with NA's

Arguments

y

vector

ind

index locations where NA is inserted

Author

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

Details

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

Examples

Run this code
  x = 1:10
 insertNA(x, 6)

Run the code above in your browser using DataLab