get.data: Query SHiNeMaS and return the datasets

Description Usage Arguments Details Value Author(s) See Also Examples

Description

get.data queries SHiNeMaS and returns the data-sets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get.data(db_user = "pierre", db_host = "127.0.0.1",
  db_name = "shinemas_tuto", db_password = "pierre",
  query.type = "person", filter.on = NULL, germplasm.in = NULL,
  germplasm.out = NULL, germplasm.type.in = NULL,
  germplasm.type.out = NULL, year.in = NULL, year.out = NULL,
  project.in = NULL, project.out = NULL, person.in = NULL,
  person.out = NULL, seed.lot.in = NULL, seed.lot.out = NULL,
  relation.in = NULL, reproduction.type.in = NULL, variable.in = NULL,
  data.type = NULL, network.info = TRUE, Mdist = FALSE,
  fill.diffusion.gap = FALSE, mixrep_to_repro = TRUE)

Arguments

db_user

user name of SHiNeMaS

db_host

IP address of the computer where SHiNeMaS is. If local host db_host = "127.0.0.1"

db_name

name of the data base

db_password

your password to login. If no password is needed, put ""

query.type

Type of query, which will create a data set. There are eight types:

  1. "network": network relations between seed-lots. All filters are possible.

  2. "cross": seed-lots used to give a cross: father, grandfather, mother, grandmother and cross. All filters are possible except variable.in, relation.in, seed.lots.in, seed.lots.out and reproduction.type.in.

  3. raw information on levels and variables contained in SHiNeMaS :

    • "species"

    • "variable"

    • "person"

    • "year"

    • "project"

    • "seed.lot"

    • "selection.person": persons that performed intra-varietal mass selection

    • "reproduction.type"

    • "germplasm.type"

    • "germplasm"

  4. data with variable on specific seed-lots :

    • "data-classic": default dataframe.

    • "data-S": selection differential for a given year.

    • "data-SR": seed-lots pairs of selection differential for year n-1 and response to selection for year n.

    • "data-mixture-1": seed-lots used in a mixture

  5. "methods": information related to the methods used for each variable in SHiNeMaS with its description and units Filters can be applied on variables. Possible filter is variable.in.

  6. "person.info": information regarding persons stored in SHiNeMaS. Possible filters are person.in and person.out.

  7. "grandfather": information on son, father and grandfather. All filters are possible except relation.in and variable.in.

filter.on

This argument is needed if you want to use filters. It chooses on which seed-lots the filters are applied: "son", "father" or "father-son". Filter.on is not used for data.type = "seed-lots", query.type = "methods" and query.type = "person.info"

germplasm.in

Filter: vector with germplasms to keep. By default, all the germplasms are in.

germplasm.out

Filter: vector with germplasms to discard. By default, no germplasm is out.

germplasm.type.in

Filter: vector with germplasms to keep. By default, all the germplasm types are in.

germplasm.type.out

Filter: vector with germplasms to discard. By default, no germplasm type is out.

year.in

Filter: vector with years to keep. By default, all the years are in.

year.out

Filter: vector with years to discard. By default, no year is out.

project.in

Filter: vector of projects to keep. By default, all the projects are in.

project.out

Filter: vector of projects to discard. By default, no project is out.

person.in

Filter: vector of persons to keep. By default, all the persons are in.

person.out

Filter: vector of persons to discard. By default, no person is out.

seed.lot.in

Filter: vector of seed-lots to keep. By default, all the seed-lots are in.

seed.lot.out

Filter: vector of seed-lots to discard. By default, no seed-lot is out.

relation.in

Filter on a relation to keep: "reproduction", "mixture", "selection" or "diffusion". By default, all relations are in.

reproduction.type.in

Filter on reproduction types

variable.in

Filter: vector with variables to keep. If NULL, all variables in SHiNeMaS are displayed.

data.type

For queries in "data-". Type of data: "relation" for data linked to relation between seed lots and "seed-lots" for data linked to seed lots

network.info

For query.type = "network". If TRUE, aggregates information on relations and seed-lots on the network and return it in the results.

Mdist

For query.type = "network". If TRUE, computes the Mdist matrix and return it in the results. See details.

fill.diffusion.gap

For query.type = "network", create a network with no gaps between seed-lots (as long as there is information!)

mixrep_to_repro

For query.type = "network", tranform the mixtures of replications into reproductions, i.e. the network keeps only 'real' mixtures (i.e. different germplasm for father and son) and correct the information regarding what have been harvested and sown after as the mixture disappear. TRUE by default.

Details

Value

The function returns a list with

Author(s)

Pierre Riviere for R code and Yannick de Oliveira for SQL code

See Also

encrypt.data, translate.data,, format.data, get.ggplot, get.table

Examples

1
# See the vignette

priviere/shinemas2R_deprecated documentation built on May 8, 2019, 1:21 p.m.