Learn R Programming

QBMS (version 1.0.0)

list_trials: Get the List of Trials in the Current Active Breeding Program

Description

Retrieves the trials list from the current active breeding program as configured in the internal state object using `set_program()` function.

Usage

list_trials(year = NULL)

Value

A list of trials names.

Arguments

year

The starting year to filter the list of trials (optional, default is NULL).

Author

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

See Also

login_bms, set_crop, set_program

Examples

Run this code
if(interactive()) {
  # Configure your server connection
  set_qbms_config("https://bms.icarda.org/ibpworkbench")

  # Login using your account (interactive mode)
  # You can pass your username and password as parameters (batch mode)
  login_bms()

  # Select a crop by name
  set_crop("wheat")

  # Select a breeding program by name
  set_program("Wheat International Nurseries")

  # List all studies/trials in the selected program
  list_trials()

  # Filter listed studies/trials by year
  list_trials(2022)
}

Run the code above in your browser using DataLab