jitter_norm: Apply jitter using normal distribution

jitter_normR Documentation

Apply jitter using normal distribution

Description

Apply jitter using normal distribution

Usage

jitter_norm(x, factor = 1, amount = NULL, ...)

Arguments

x

numeric vector

factor

numeric value to define the magnitude of jitter, multiplied by the default jitter which is 1/10 the median difference between unique values in x.

amount

optional numeric value indicating a fixed sd standard deviation passed to stats::rnorm().

...

additional arguments are ignored.

Details

This function applies a jitter (noise) to points by adding random values from a normal distribution, where the argument sd is used to apply the jitter magnitude.

The default jitter is defined as 1/10 the median difference between unique, finite input values, which can be scaled using the argument factor. Note the use of "unique" input values, which ensures the presence of duplicate values does not skew the jitter toward zero. When applied to three dimensions, this results in jitter consistently scaled relative to the range of values in each dimension. That is, points will appear to have a radial jitter.

See Also

Other jam plot functions: bgaPlotly3d(), factor2label(), gene2gg(), grl2df(), plotSashimi(), prepareSashimi(), stackJunctions()


jmw86069/splicejam documentation built on April 21, 2024, 4:57 p.m.