ba_studies_table: ba_studies_table

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

View source: R/ba_studies_table.R

Description

Retrieve observation units, including actual trait data, as table for a specific study.

Usage

1
2
ba_studies_table(con = NULL, studyDbId = "", format = c("csv", "tsv",
  "json"), rclass = c("tibble", "data.frame", "json"))

Arguments

con

list, brapi connection object

studyDbId

character, the internal database identifier for a study of which the observation units, including actual trait data, are to be retrieved e.g. "1001"; REQUIRED ARGUMENT with default: ""

format

character, the format parameter will cause the data to be dumped to a file in the specified format; default: "csv", possible other values: "tsv"/"json"

rclass

character, class of the object to be returned; default: "tibble", possible other values: "data.frame"/"json"

Details

This function must have set a specific study identifier. The default is an empty string. If not changed to an study identifier present in the database this will result in an error.

When specifying the format argument, be aware that format = "csv" or "tsv" can only be combined with rclass = "tibble" or "data.frame". Using format = "json" allows for specifying the rclass = "json", "tibble, or "data.frame".

Choosing format = "json" could give unexpected results, because pagenation (default: pageSize = 1000 and page = 0) is not implemented correctly on all databases and additionally the table for the specific study could have more than 1000 rows.

Value

An object of class as defined by rclass containing the observation units, including trait data, for a requested study.

Note

Tested against: BMS, test-server, sweetpotatobase

BrAPI Version: 1.0, 1.1, 1.2

BrAPI Status: active

Author(s)

Reinhard Simon, Maikel Verouden

References

github

See Also

Other studies: ba_phenotypes_search, ba_studies_details, ba_studies_germplasm_details, ba_studies_layout, ba_studies_observationlevels, ba_studies_observations, ba_studies_observationunits, ba_studies_observationvariables, ba_studies_search_post, ba_studies_search, ba_studies_seasons, ba_studies_studytypes, ba_studies_table_save

Other phenotyping: ba_phenotypes_search, ba_samples_save, ba_samples_search_post, ba_samples_search, ba_samples, ba_studies_details, ba_studies_layout, ba_studies_observationlevels, ba_studies_observations, ba_studies_observationunits_save, ba_studies_observationunits, ba_studies_observationvariables, ba_studies_search_post, ba_studies_search, ba_studies_seasons, ba_studies_studytypes, ba_studies_table_save, ba_trials_details, ba_trials

Examples

1
2
3
4
5
6
7
if (interactive()) {
  library(brapi)

  con <- ba_db()$sweetpotatobase

  ba_studies_table(con, studyDbId = "1207")
}

c5sire/brapi documentation built on Oct. 17, 2019, 11:45 a.m.