wjitter: Weighted Jitter

View source: R/plot.RAy.R

wjitterR Documentation

Weighted Jitter

Description

Use weights to jitter values away from their current value.

Usage

wjitter(x, w, amount=.43)

Arguments

x

a vector of values.

w

a vector of weights of the same length as x.

amount

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

Value

A weighted jittered vector of the same length as x.

Examples

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

caroline documentation built on July 15, 2026, 9:06 a.m.