list_trials: Get the list of trials in the current active breeding program

View source: R/qbms.R

list_trialsR Documentation

Get the list of trials in the current active breeding program

Description

This function will retrieve 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)

Arguments

year

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

Value

a list of trials names

Author(s)

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

See Also

login_bms, set_crop, set_program

Examples

if(interactive()) {
# config your BMS connection
set_qbms_config("https://bmsdev-brapi.ibp.services/ibpworkbench")

# login using your BMS account (interactive mode)
# you can pass BMS username and password as parameters (batch mode)
login_bms()

set_crop("maize")

# select a breeding program by name
set_program("MC Maize")

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

# filter listed studies/trials by year
list_trials(2020)
}

khaled-alshamaa/QBMS documentation built on Jan. 27, 2024, 6:40 a.m.