# NOT RUN {
library(pins)
# cache the mtcars dataset
pin(mtcars)
# cache computation oveer mtcars
mtcars[mtcars$mpg > 30,] %>%
pin(name = "mtefficient")
# retrieve cached pin
pin_get("mtefficient")
# url to remote resource
resource <- file.path("https://raw.githubusercontent.com/facebook/prophet",
"master/examples/example_retail_sales.csv")
# cache remote resource
pin(resource, name = "example_retail_sales")
# load cached csv
pin_get("example_retail_sales") %>% read.csv()
# cache and read csv
read.csv(pin(resource))
# }
Run the code above in your browser using DataLab