R/zzz.R

Defines functions .onLoad

.onLoad <- function(libname, pkgname) {

  # .auth is created in R/gs4_auth.R
  # this is to insure we get an instance of gargle's AuthState using the
  # current, locally installed version of gargle
  utils::assignInMyNamespace(
    ".auth",
    gargle::init_AuthState(package = "googlesheets4", auth_active = TRUE)
  )

  if (identical(Sys.getenv("IN_PKGDOWN"), "true")) {
    tryCatch(
      gs4_auth_docs(),
      googlesheets4_auth_internal_error = function(e) NULL
    )
  }

  invisible()
}

Try the googlesheets4 package in your browser

Any scripts or data that you put into this service are public.

googlesheets4 documentation built on July 22, 2021, 1:07 a.m.