shinemas: Query the database SHiNeMaS throught an API and format data...

Description Usage Arguments Details Value Author(s) Examples

View source: R/shinemas.R

Description

shinemas queries the database SHiNeMaS throught an API and formats data for specific R packages

Usage

1
2
3
4
5
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)

Arguments

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

  • PPBstats

    • PPBstats_data_network_unipart_seed_lots

    • PPBstats_data_agro

    • PPBstats_data_agro_SR

    • PPBstats_data_agro_HA

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

Details

Value

The function returns a dataframe formated for specific query type and packages

Author(s)

Pierre Riviere

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
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")

## End(Not run)

priviere/shinemas2R documentation built on Jan. 28, 2021, 1:12 a.m.