Skip to contents

Retrieves the list of trials for the current active breeding program. Optionally, filters trials by their starting year if specified.

Usage

list_trials(year = NULL)

Arguments

year

Numeric. An optional parameter to filter trials by their starting year. If not provided, all trials for the active program are returned.

Value

A data frame containing the names of trials for the active breeding program. If no trials match the query, a warning is issued, and NA is returned.

Note

The year filter is only supported for BMS databases.

See also

login_bms, set_crop, set_program for related operations involving crop and program selection.

Author

Khaled Al-Shamaa, k.el-shamaa@cgiar.org

Examples

if (interactive()) {
  set_qbms_config("https://bms.icarda.org/ibpworkbench")
  login_bms()  # Log in to the server
  set_crop("wheat")  # Set crop
  set_program("Wheat International Nurseries")  # Set breeding program
  list_trials()  # List trials
  list_trials(2022)  # List trials starting in 2022
}