The cranlogs packge will be super-useful for us to create some sample daily-data.
library("lubridate") library("tibble") library("dplyr") library("cranlogs")
This is a fake dataset to test a fake model to determine if a day is a weekend. Our dataset will include two years of dates.
cran_sample <- cran_downloads( packages = c("ggplot2", "dplyr"), from = "2015-01-01", to = "2016-12-31" ) %>% transmute( date, package, count = as.integer(count) ) %>% as_tibble()
print(cran_sample)
Variable | Type | Description
----------| ----------- | -------------------------------------------------
date
| Date
| date of the observation
package
| character
| name of the package
count
| integer
| number of downloads, according to the RStudio logs
devtools::use_data(cran_sample, overwrite = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.