gdoc: Create a Google Doc from an R Markdown File

View source: R/gdoc.R

gdocR Documentation

Create a Google Doc from an R Markdown File

Description

Create a Google Doc from an R Markdown File

Usage

gdoc(reference_docx = NULL, token = gd_auth(), browse = NULL,
  keep_md = FALSE, clean_supporting = TRUE)

Arguments

reference_docx

Use the specified file as a style reference in producing an intermediate MS Word docx file. For best results, the reference docx should be a modified version of a docx file produced using pandoc. 'NULL' requests the default reference docx built into the package.

token

Google OAuth2 token. gd_auth() will load a previously cached token from .httr-oauth, if available and still valid. Otherwise, gd_auth() will initiate the browser dance to obtain and cache a new token, which requires an interactive() session. gd_auth() can be called explicitly to prepare for non-interactive() use, such as via the "Knit" button in RStudio.

browse

Logical. Whether to open the created Google Doc in the browser. Default (NULL) will open only in interactive R sessions.

keep_md

Logical. Whether to retain the knit markdown file.

clean_supporting

Logical. Whether to keep other intermediate files, including the MS Word docx file.


ropenscilabs/gdoc documentation built on May 18, 2022, 7:38 p.m.