Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gs4_find

Find Google Sheets


Description

Finds your Google Sheets. This is a very thin wrapper around googledrive::drive_find(), that specifies you want to list Drive files where type = "spreadsheet". Therefore, note that this will require auth for googledrive! See the article Using googlesheets4 with googledrive if you want to coordinate auth between googlesheets4 and googledrive. This function will emit an informational message if you are currently logged in with both googlesheets4 and googledrive, but as different users.

Usage

gs4_find(...)

Arguments

...

Arguments (other than type, which is hard-wired as type = "spreadsheet") that are passed along to googledrive::drive_find().

Value

An object of class dribble, a tibble with one row per item.

Examples

if (gs4_has_token()) {
  # see all your Sheets
  gs4_find()

  # see 5 Sheets, prioritized by creation time
  x <- gs4_find(order_by = "createdTime desc", n_max = 5)
  x

  # hoist the creation date, using other packages in the tidyverse
  # x %>%
  #   tidyr::hoist(drive_resource, created_on = "createdTime") %>%
  #   dplyr::mutate(created_on = as.Date(created_on))
}

googlesheets4

Access Google Sheets using the Sheets API V4

v0.3.0
MIT + file LICENSE
Authors
Jennifer Bryan [cre, aut] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.