rcheatsheet
simplifies the process of creating a cheatsheet for R packages by using Google Drive Excel Sheets.
You need to install googlesheets
in addition to rcheatsheet
.
install.packages('googlesheets')
devtools::install_github("ramnathv/rcheatsheet")
Step 1: Create Google Sheet
Step 2: Add cheatsheet data following the template
- Follow the template of labelling worksheets
- Create cheatsheet using function
make_cheatsheet
library(rcheatsheet)
library(magrittr)
# Download Google Sheet to Excel
library(googlesheets)
fpath <- 'cheatsheet.xlsx'
sheet_data <- gs_title('cheatsheet data')
gs_download(sheet_data, to = fpath, overwrite = TRUE)
# Create cheatsheet
x = 1:5
l = list(x = 1:5, y = c('a', 'b'))
df = data.frame(x = 1:3, y = c('a', 'b', 'c'))
fpath %>%
read_all_sheets %>%
make_cheatsheet