Learn R Programming

caroline (version 0.9.9)

wjitter: Weighted Jitter

Description

Use weights to jitter values away fromt their current value.

Usage

wjitter(x, w, amount=.43)

Value

A weighted jittered vector of the same length as x

Arguments

x

a vector of values

w

a vector of weights of the same lenght as x

amount

the amount to jitter (passed to the parameter by the same name in the jitter function)

Examples

Run this code
x <- seq(1,20)
w <- runif(20, 0,1)
plot(x,wjitter(w,x))

Run the code above in your browser using DataLab