jitter: Jitter vector containing NA

Description Usage Arguments Value Author(s) Examples

Description

Extension of jitter to deal with NA entries

Usage

1

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

Author(s)

Christian W. Hoffmann <christian@echoffmann.ch>

Examples

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

Example output

Loading required package: lattice
Loading required package: grid
           x         y
1  0.9215277  1.022858
2  0.8128113  2.064624
3  0.8797412        NA
4  1.1136357  4.001119
5         NA  5.122583
6  1.1038287  5.869475
7  0.8745192  6.806732
8  0.8014483  8.108626
9  1.0046865  9.095239
10 0.9261619 10.195085

cwhmisc documentation built on May 1, 2019, 7:55 p.m.