Contains a mixture of functions and data sets referred to in the introductory e-book "YaRrr!: The Pirate's Guide to R". The latest version of the e-book is available for free at < https://www.thepiratesguidetor.com>.
yarrr package contains a mixture of data, functions and tutorials supporting the e-book "YaRrr! The Pirate's Guide to R" (www.thepiratesguidetor.com).
To install the (stable) version from CRAN, run the following code
install.packages("yarrr") # install yarrrlibrary("yarrr") # load yarrryarrr.guide() # run main package guide
To install the latest developer version from CRAN, run the following code
install.packages("devtools") # install yarrrdevtools::install_github("ndphillips/yarrr", build_vignettes = TRUE)library("yarrr") # load yarrryarrr.guide() # run main package guide
Here are the most important parts of the package:
pirateplot function creates a pirateplot, a transparent (both literally and figuratively) plot for displaying continuous data as a function of 1, 2, or 3 discrete variables. Unlike traditional plots, like barplots and boxplots, the pirateplot shows both raw data (jittered points), descriptive statistics (line and/or bar), and inferential statistics (95% Bayesian Highest Density Intervals or Confidence Intervals), in one plot. While the default plot shows all these elements, the user can easily customize the transparency of each element using additional arguments.
?pirateplot or https://cran.r-project.org/web/packages/yarrr/vignettes/pirateplot.html for more details
Minor updates to themes. Added
theme = 3
You can now assign a pirateplot to a variable to return summary statistics.
NEWS.md file to track changes to the package.
Re-structured code generating colors and opacities in
pirateplot() to make future updates easier.
quant.width arguments that add horizontal lines for specified quantiles to each bean (thanks @pat-s)
Added several new arguments (e.g.;
bean.fill.col for customising pirateplots
Improved theme support (now under
theme rather than
pirateplot()can now handle up to 3 IVs!
pirateplot(age ~ sex + headband + favorite.pirate, data = pirates).
Minor and Bug-fixes
pirateplot()was prevously not being passed to the Bayesian HDIs, rendering all inference bands to be the default of 95% (thanks to Roman Pahl for catching this). This has now been fixed.
hdi.band = "tight"will constrain inference bands to bean densities.