Description Usage Arguments Examples

A pirate plot
(https://cran.r-project.org/web/packages/yarrr/vignettes/pirateplot.html)
is a way of displaying data where a continuous dependent variable is a
function of a categorical independent variable, in a more informative way
than the traditional barplot. `geom_pirate`

plots the raw data as points
(using geom_jitter), along with layers showing descriptive
and inferential statistics – bars indicating means (using
geom_col), horizontal line indicating means (using
geom_crossbar), boxes indicating 95% confidence intervals
assuming a normal sampling distribution (using geom_tile),
and violins indicating the density (using geom_violin).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
geom_pirate(
mapping = NULL,
data = NULL,
...,
points = TRUE,
bars = TRUE,
lines = TRUE,
cis = TRUE,
violins = TRUE,
points_params = list(shape = 1, size = 1),
bars_params = list(alpha = 0.3, width = 0.9),
lines_params = list(size = 0.5, width = 0.9),
cis_params = list(fill = "white", size = 0.5, alpha = 0.5, width = 0.8),
violins_params = list(fill = "white", size = 0.5, alpha = 0, width = 0.7),
jitter_width = 0.2,
na.rm = FALSE,
show.legend = FALSE,
inherit.aes = TRUE
)
``` |

`mapping` |
Set of aesthetic mappings created by |

`data` |
The data to be displayed in this layer. There are three options: If A A |

`...` |
Other arguments passed on to |

`points` |
logical indicating whether to show points |

`bars` |
logical indicating whether to show mean bars |

`lines` |
logical indicating whether to show mean lines |

`cis` |
logical indicating whether to show 95% confidence intervals boxes |

`violins` |
logical indicating whether to show violins |

`points_params` |
list of parameters to pass to points layer |

`bars_params` |
list of parameters to pass to bars layer |

`lines_params` |
list of parameters to pass to lines layer |

`cis_params` |
list of parameters to pass to CIs layer |

`violins_params` |
list of parameters to pass to violins layer |

`jitter_width` |
amount of horizontal jitter added to the locations of the points (defaults to 20% of the resolution of the data) |

`na.rm` |
If |

`show.legend` |
logical indicating whether this layer be included in the legends (defaults to FALSE) |

`inherit.aes` |
If |

1 2 | ```
ggplot(mpg, aes(x = class, y = cty)) +
geom_pirate(aes(colour = class))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.