inst/doc/guide.R

## ----echo = F, message = F, results = 'hide'----------------------------------
library(yarrr)

## ----fig.width = 6, fig.height = 6, fig.align='center'------------------------
pirateplot(
  formula = weight ~ Time,
  data = ChickWeight,
  main = "Chicken weights by Time (week)"
)

## ----fig.width = 6, fig.height = 6, fig.align = 'center'----------------------
piratepal("all")

## ----fig.width = 6, fig.height = 6, fig.align = 'center'----------------------
my.cols <- piratepal(
  palette = "google",
  trans = .5
)

set.seed(100) # For reproducibility
x <- rnorm(100)
y <- x + rnorm(100)

plot(
  x = x, y = y, col = my.cols,
  pch = 16,
  cex = runif(100, min = 0, max = 2),
  main = "piratepal('google', trans = .5)"
)

Try the yarrr package in your browser

Any scripts or data that you put into this service are public.

yarrr documentation built on Aug. 8, 2025, 7:23 p.m.