list_trials: List Trials in the Current Active Breeding Program

View source: R/qbms.R

list_trialsR Documentation

List Trials in the Current Active Breeding Program

Description

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.

Author(s)

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

See Also

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

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
}


icarda-git/QBMS documentation built on Sept. 25, 2024, 10:45 p.m.