forked from CIP-RIU/brapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the tutorial using sweetpotatobase. This has a public API and no credentials are necessary.
- Loading branch information
c5sire
committed
Sep 17, 2017
1 parent
80337ac
commit cbf3805
Showing
9 changed files
with
450 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: brapi | ||
Title: Client to Access Breeding Databases Using BrAPI | ||
Version: 0.9.0 | ||
Version: 0.9.9016 | ||
Authors@R: c( | ||
person("Reinhard", "Simon", email = "[email protected]", role = c("aut", "cre")), | ||
person("Maikel", "Verouden", role = c("aut", "ctb"), | ||
|
@@ -14,5 +14,5 @@ LazyData: true | |
RoxygenNote: 6.0.1 | ||
Imports: httr, jsonlite, Rcpp, stringi, stringr, progress, curl, magrittr, tibble, | ||
dplyr, httpuv, utils, tidyjson, readr, tidyr, DBI, crayon | ||
Suggests: knitr, rmarkdown, testthat, covr, maps, assertthat, xtable | ||
Suggests: knitr, rmarkdown, testthat, covr, maps, assertthat, xtable, DT | ||
VignetteBuilder: knitr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
## ------------------------------------------------------------------------ | ||
|
||
library(brapi) | ||
|
||
white_list <- ba_db() | ||
|
||
# print names of databases from whitelist | ||
white_list | ||
|
||
sp_base <- ba_db()$sweetpotatobase | ||
|
||
# print summary of sp_base object | ||
sp_base | ||
|
||
|
||
## ------------------------------------------------------------------------ | ||
crops <- ba_crops(sp_base) | ||
|
||
# We only expect one crop here: sweetpotato | ||
|
||
crops | ||
|
||
|
||
## ------------------------------------------------------------------------ | ||
ba_show_info(TRUE) | ||
|
||
## ------------------------------------------------------------------------ | ||
ba_calls(sp_base) | ||
ba_show_info(FALSE) | ||
|
||
## ------------------------------------------------------------------------ | ||
ba_calls(con = sp_base, rclass = "data.frame") | ||
|
||
## ------------------------------------------------------------------------ | ||
ba_programs(sp_base, rclass = "data.frame") | ||
|
||
## ------------------------------------------------------------------------ | ||
ba_studies_search(sp_base, programDbId = "140") | ||
|
||
## ---- message=FALSE, warning=FALSE--------------------------------------- | ||
dt = ba_studies_table(sp_base, studyDbId = "162") | ||
|
||
## ---- echo=FALSE--------------------------------------------------------- | ||
library(DT) | ||
datatable( | ||
dt, | ||
options=list(pageLength = 5, scrollX = TRUE) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.