Learn R Programming

lares (version 5.0.3)

readGS: Google Sheets Reading (API v4)

Description

Read data from Google Sheets knowing the file's title. You may read a single value from a cell or a data.frame from a cell range.

Usage

readGS(
  title,
  sheet = "Hoja 1",
  range = NULL,
  drop_nas = TRUE,
  json = NULL,
  email = NULL,
  api_key = NULL,
  server = FALSE,
  ...
)

Arguments

title

Character. Title of Google Drive file. Uses regular expressions so you may fetch with patterns instead of names.

sheet

Character. Working sheet to import

range

Character. A cell range to read from

drop_nas

Boolean. Remove columns and rows that contain only NAs?

json

Character. JSON filename with service auth

email, api_key

Character. If you have multiple pre-authorized accounts in your machine, you may non-interactively select which one you wish to use by email and/or api_key.

server

Boolean. Force interacting auth process?

...

Additional parameters passed to read_sheet().

Value

data.frame with the results of your Google Sheets file based on its title, specificially the sheet and range requested.

See Also

Other Scrapper: filesGD(), get_mp3(), holidays(), ip_data(), splot_etf(), stocks_hist(), stocks_quote(), trendsRelated(), writeGS()

Other Google: filesGD(), queryGA(), trendsRelated(), trendsTime(), writeGS()