R/shinemas.R
shinemas.Rd
shinemas
queries the database SHiNeMaS throught an API and formats data for specific R packages
shinemas(db_url = "shinemas.local.seed", user = "wheat", password = "ppb", token = "1234", query_type = "PPBstats_data_agro", specie = NULL, project = NULL, variable = NULL, germplasm = NULL, germplasm_type = NULL, relation_type = NULL, location = NULL, year = NULL)
db_url | url of the database |
---|---|
user | user name |
password | password |
token | token to connect to the database |
query_type | name of the query. Possible values are
|
specie | filter: specie to keep |
project | filter: project to keep |
variable | filter: variable to keep |
germplasm | filter: germplasm to keep |
germplasm_type | filter: germplasm type to keep |
relation_type | filter: relation type to keep |
location | filter: location to keep |
year | filter: year to keep |
The function returns a dataframe formated for specific query type and packages
SHiNeMaS: The database SHiNeMaS (Seed History and Network Management System) is available here: https://sourcesup.renater.fr/frs/?group_id=2295. The query is based on a webservice developped within SHiNeMaS v2 by Laetitia Courgey and Yannick de Oliveira. The token can be taken through the web interface of SHiNeMaS by cliking "Get Token" on the top left side of the page.
query_type: The query_type is under the format [package-name]_[query-name]. For example PPBstats_data_agro stands for data_agro format for package PPBstats.
Package supported:
See https://priviere.github.io/shinemas2R/#packages-supported for more details
PPBstats
For query_type = PPBstats_data_agro and PPBstats_data_agro_HA
filter year refers to sown year of seed-lot parent or year of selection of seed-lot parent
relation_type is either reproduction or selection
if (FALSE) { data_agro = shinemas2R::shinemas( db_url = "shinemas.local.seed", user = "wheat", password = "ppb", token = "1234", query_type = "PPBstats_data_agro" ) library(PPBstats) data = format_data_PPBstats(data_agro, type = "data_agro") }