README-NOT.md

Cheatsheet Generator

rcheatsheet simplifies the process of creating a cheatsheet for R packages by using Google Drive Excel Sheets.

Install rcheatsheet

You need to install googlesheets in addition to rcheatsheet.

install.packages('googlesheets')
devtools::install_github("ramnathv/rcheatsheet")

How to Use

Step 1: Create Google Sheet

Step 2: Add cheatsheet data following the template

example

  1. Follow the template of labelling worksheets
  2. 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

Slide Deck



ropenscilabs/rcheatsheet documentation built on May 11, 2022, 9:35 p.m.