knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

CraftCans

CraftCans is a tiny R package to get and play with the data from Craft Cans. It contains, among other things, the quite wonderful beer_me() function, which will 'serve' you a random beer from Craft Cans lovely stock. Sláinte!

edit: Looks like the API is out. Pity. beers and beer_me() still work, though.

Installation

devtools::install_github("RobertMyles/CraftCans")

library(CraftCans)

Usage

You can get a complete list of all the canned beers Craft Cans have with beer_table(). Since this function downloads and parses data, a faster alternative is data("beers"), which returns a dataframe of these canned beers, taken from Craft Cans at the end of May 2017. beer_table() will return up-to-date information, however.

data("beers")
beers

Beer me!

beer_me()
beer_me(number = 4)

I'm working on plotting the cans as images (from this page), so that may or may not be done soon. Withering criticisms/lovely suggestions always welcome.



RobertMyles/CraftCans documentation built on May 20, 2019, 2:43 p.m.