Skip to contents

Databrary generates a CSV-formated spreadsheet that summarizes information about individual sessions. This command downloads that CSV file as a temporary file or with a name specified by the user.

Usage

download_session_csv(
  vol_id = 1,
  file_name = "test.csv",
  target_dir = tempdir(),
  as_df = FALSE,
  vb = options::opt("vb"),
  rq = NULL
)

Arguments

vol_id

An integer. Target volume number. Default is 1.

file_name

A character string. Name for the output file. Default is 'test.csv'.

target_dir

A character string. Directory to save downloaded file. Default is tempdir().

as_df

A logical value. Convert the data from a list to a data frame. Default is FALSE.

vb

Show verbose messages. (Defaults to FALSE, overwritable using option 'databraryr.vb' or environment variable 'R_DATABRARYR_VB')

rq

An httr2 request object. Default is NULL.

Value

A character string that is the name of the downloaded file or a data frame if as_df is TRUE.

Examples

# \donttest{
if (FALSE) { # \dontrun{
download_session_csv() # Downloads "session" CSV for volume 1
} # }
# }