tbl_check_gs_access: Check google spreadsheet access

tbl_check_gs_accessR Documentation

Check google spreadsheet access

Description

This function checks whether google spreadsheet credentials are established and there is access to the data_gs_title google sheet. The gs_key_file must grant access to the google spreadsheet (data_gs_title). See the peer evaluations vignette for details on how to set up google credentials and generate a key file.

Usage

tbl_check_gs_access(
  folder = "peer_evaluation",
  data_gs_title = "Peer Evaluation",
  data_gs_id = NULL,
  gs_key_file = file.path(folder, "gs_key_file.json")
)

Arguments

folder

target folder where to setup the peer evaluation (path must be either relative to the current working directory or an absolute file path on the operating system). If the folder does not exist yet, it will be created automatically.

data_gs_title

name of the google spreadsheet that should be used for storing the peer evaluation data. This spreadsheet must already exist and the gs_key_file must grant access to it.

data_gs_id

optional alternative to the data_gs_title, a google spread sheet ID text or object (see sheets_id). If provided, it takes precedence over the data_gs_title parameter as the google spreadsheet doesn't need to be searched by name anymore (i.e. can be loaded faster).

gs_key_file

path to your .json access key file for peer evaluation google spreadsheets. See the peer evaluations vignette for details. This key file is safe to use on a secure shiny app server but be careful to never post this file anywhere publicly as it could be used to gain access to your peer evaluation spreadsheets. Make sure to share the google spreadshhet for this peer evaluation with the client_email listed in the key file.

Value

returns the retrieved authentication token from the key file invisibly

See Also

Other peer evaluation functions: tbl_duplicate_peer_evaluation(), tbl_run_peer_evaluation(), tbl_setup_peer_evaluation(), tbl_test_peer_evaluation()


KopfLab/tbltools documentation built on July 30, 2023, 11:16 p.m.