Learn R Programming

googlesheets4 (version 0.3.0)

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 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

Run this code
# NOT RUN {
if (gs4_has_token()) {
  ss <- gs4_get(gs4_example("mini-gap"))
  class(ss)
  googledrive::as_id(ss)
}
# }

Run the code above in your browser using DataLab