jiggle: Jiggle points horizontally

View source: R/jiggle.R

jiggleR Documentation

Jiggle points horizontally

Description

Spread points out horizontally so that, in dot plot of quantitative response in multiple categories, the separate points can be seen.

Usage

jiggle(
  group,
  y,
  method = c("random", "fixed"),
  hnum = 35,
  vnum = 40,
  maxvalue = 0.45
)

Arguments

group

Categorical variable defining group; can be a factor, character, or numeric vector

y

Vector of quantitative responses

method

What method to use for horizontal jiggling.

hnum

Number of horizontal bins for the jiggling.

vnum

Number of vertical bins for the jiggling.

maxvalue

Maximum value in the results; results will be scaled to this value. Use NULL to not scale.

Details

The "random" method is similar to base::jitter() but with amount of jiggling proportional to the number of nearby points. The "fixed" method is similar to the beeswarm package

Value

Numeric vector with amounts to jiggle the points horizontally

See Also

base::jitter(), dotplot()


broman documentation built on July 8, 2022, 5:07 p.m.

Related to jiggle in broman...