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

as_id.googlesheets4_spreadsheet

Extract the file id from Sheet metadata


Description

This method implements googledrive::as_id() for the class used here to hold metadata for a Sheet. It just calls as_sheets_id(), but it's handy in case you forget that exists and hope that as_id() will "just work".

Usage

## S3 method for class 'googlesheets4_spreadsheet'
as_id(x, ...)

Arguments

x

An instance of googlesheets4_spreadsheet, which is returned by, e.g., gs4_get().

...

Other arguments passed down to methods. (Not used.)

Value

A character vector bearing the S3 class drive_id.

Examples

if (gs4_has_token()) {
  ss <- gs4_get(gs4_example("mini-gap"))
  class(ss)
  googledrive::as_id(ss)
}

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.