insertNA function

Insert NA in a vector

Insert NA in a vector

Inserting NA values in a vector at specific index locations

insertNA(y, ind)

Arguments

  • y: vector
  • ind: index locations where NA is inserted

Details

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

Returns

  • v: new vector with NA's

Author(s)

Jonathan M. Leesjonathan.lees@unc.edu

Examples

x = 1:10 insertNA(x, 6)
  • Maintainer: Jonathan M. Lees
  • License: GPL (>= 2)
  • Last published: 2024-07-09

Useful links