Learn R Programming

cwhmisc (version 6.0)

jitterNA: Jitter vector containing NA

Description

Extension of jitter to deal with NA entries

Usage

jitterNA(x,...)

Arguments

x
Data to be jittered, may be vector, matrix, or numerical data frame.
...
Other parameters for jitter.

Value

jitterNA(x, ...) return a numeric vector with jittered entries, NA entries are allowed and not changed

Examples

Run this code
  d <- data.frame(cbind(x=1, y=1:10))
  d[5,1] <- d[3,2] <- NA
  jitterNA(d)

Run the code above in your browser using DataLab