Retrieve metadata for a set of trials by study IDs
getTrialMetaDataFromTrialVec.RdGiven a vector of BrAPI study IDs, query the /studies/{studyDbId}
endpoint for each and compile a tidy data frame of trial metadata.
Arguments
- study_id_vec
A character vector of BrAPI study IDs (studyDbId values) to query.
- brapiConnection
A BrAPI connection object, typically created by
BrAPI::createBrAPIConnection(), with$get()method available.
Value
A tibble-like data frame with one row per trial and cleaned column
names (via janitor::clean_names()). Date columns start_date
and end_date are converted to POSIXct in UTC.
Examples
if (FALSE) { # \dontrun{
brapiConn <- BrAPI::createBrAPIConnection("wheat-sandbox.triticeaetoolbox.org", is_breedbase = TRUE)
# Retrieve metadata for two trials
df <- getTrialMetaDataFromTrialVec(c("8128", "9421"), brapiConn)
df
} # }