googlesheets4 ships with static IDs for some world-readable example Sheets for use in examples and documentation. These functions make them easy to access by their nicknames.

gs4_example(matches)

gs4_examples(matches)

Arguments

matches

A regular expression that matches the nickname of the desired example Sheet(s). This argument is optional for gs4_examples() and, if provided, multiple matches are allowed. gs4_example() requires this argument and requires that there is exactly one match.

Value

  • gs4_example(): a single sheets_id object

  • gs4_examples(): a named vector of all built-in examples, with class drive_id

Examples

gs4_examples()
#> <drive_id[6]>
#>                                     mini-gap 
#> 1k94ZVVl6sdj0AXfK9MQOuQ4rOhd1PULqpAu2_kr9MAU 
#>                                    gapminder 
#> 1U6Cf_qEOhiR9AZqTqS3mbMF3zt2db48ZP5v3rkrAEJY 
#>                                       deaths 
#> 1VTJjWoP1nshbyxmL9JqXgdVsimaYty21LGxxs018H2Y 
#>                                chicken-sheet 
#> 1ct9t1Efv8pAGN9YO5gC2QfRq2wT4XjNoTMXpVeUghJU 
#>                         formulas-and-formats 
#> 1wPLrWOxxEjp3T1nv2YBxn63FX70Mz5W5Tm4tGc-lRms 
#>                    cell-contents-and-formats 
#> 1peJXEeAp5Qt3ENoTvkhvenQ36N3kLyq6sq9Dh2ufQ6E 
gs4_examples("gap")
#> <drive_id[2]>
#>                                     mini-gap 
#> 1k94ZVVl6sdj0AXfK9MQOuQ4rOhd1PULqpAu2_kr9MAU 
#>                                    gapminder 
#> 1U6Cf_qEOhiR9AZqTqS3mbMF3zt2db48ZP5v3rkrAEJY 
gs4_example("gapminder")
#>  Spreadsheet name: gapminder
#>                ID: 1U6Cf_qEOhiR9AZqTqS3mbMF3zt2db48ZP5v3rkrAEJY
#>            Locale: en_US
#>         Time zone: America/Los_Angeles
#>       # of sheets: 5
#> # of named ranges: 1
#> 
#> (Sheet name): (Nominal extent in rows x columns)
#>       Africa: 625 x 6
#>     Americas: 301 x 6
#>         Asia: 397 x 6
#>       Europe: 361 x 6
#>      Oceania: 25 x 6
#> 
#> (Named range): (A1 range)        
#>        canada: 'Americas'!A38:F49