If you simply wish to interact with Google Sheets from the R console, there are much better R packages to turn to, notably Jenny Bryan's googlesheets
package. If, however, you wish to build multi-user Shiny applications, or have a closer parity between the R client and underlying Google Sheets API, this package provides that functionality via Mark Edmondson's googleAuthR
.
This package is not on CRAN.
To install the development version:
devtools::install_github("bradgwest/googleSheetsR")
Authentication is handled by the googleAuthR
package. General authentication workflows are well documented on the googleAuthR website.
For this package, you will need to specify one of the following scopes:
# Use one of the following scopes
scopes <- c(
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/spreadsheets.readonly"
)
options(googleAuthR.scopes.selected = scopes[1]))
This package stands entirely on the shoulders of Mark Edmondson and his googleAuthR package. googleAuthR
provides an easy way to build Google APIs, and provides support for multi-user shiny applications. Thanks to Mark and his collaborators. His googleAuthRverse
is a tremendous contribution to the R and Google Cloud communities.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.