Authors: Nick Strayer & Lucy D'Agostino McGowan
License: MIT
Create collaborative R Markdown files in Google Docs and render them in R
.
devtools::install_github("LFOD/GMD")
library('GMD')
Allow for R
to access your Google Doc
token <- get_auth()
Copy the URL you see when editing your Google Doc & use our function GMD to render it as an .Rmd
file. For example:
edit_url <- "https://docs.google.com/document/d/1RTCQ67mpZTKe9ddllVNCBom5uC2KMFjktKHb1mjWKOM/edit"
my_doc <- GMD(doc = edit_url, token)
my_doc()
By default, this will add a .Rmd
file to your current working directory. If you would like to change this location, you can use the setwd()
command.
live_update(my_doc)
edit_url <- "https://docs.google.com/document/d/1RTCQ67mpZTKe9ddllVNCBom5uC2KMFjktKHb1mjWKOM/edit"
edit_url %>%
GMD(token) %>%
render_doc(output_format = "html_document")