#authorize googlesheets
glamr::load_secrets()
#create spreadsheet
gs <- googlesheets4::gs4_create(glue::glue("HFR_DDC-StatusError-Reports"), sheets = c("Submission_Status", "Detailed_Error_Output"))
#move sheet to HFR folder
googledrive::drive_mv(gs, googledrive::as_id("1_jFJOi7fMJ3tABEbRoMWgQjdQBBC4h_c"))
#change permissions to allow USAID users to access
googledrive::drive_share(googledrive::as_id(gs), role = "reader",
type = "domain", domain = "usaid.gov", verbose = FALSE)
#check file permissions
googledrive::drive_reveal(googledrive::as_id(gs), "permissions")
#store file id for use in accessing
txt <- glue::glue("#' DDC Status Report Google Sheet ID
#'
#' @export
#' @return google sheet id
#'
hfr_gs_statrep <- '{gs}'")
writeLines(txt, "R/hfr_gs_statrep.R")
usethis::ui_warn("Updating package documentation and rebuilding")
devtools::document(".", quiet = TRUE)
devtools::build(".", quiet = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.