Skip to content

Commit

Permalink
Update links to tutorial on c5sire
Browse files Browse the repository at this point in the history
  • Loading branch information
c5sire committed Sep 17, 2017
1 parent cbf3805 commit dfc105e
Show file tree
Hide file tree
Showing 4 changed files with 348 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ devtools::install_github("CIP-RIU/brapi")

## How to use the package

See [tutorial](https://github.com/CIP-RIU/brapi/blob/master/inst/doc/tutorial.Rmd).
See [tutorial](https://github.com/c5sire/brapi/blob/master/inst/doc/tutorial.Rmd).

## Documentation of JSON response/requests

See the inst/apidocs directory for examples: [apidocs](https://github.com/CIP-RIU/brapi/blob/master/inst/apidocs/README.md)
See the inst/apidocs directory for examples: [apidocs](https://github.com/c5sire/brapi/blob/master/inst/apidocs/README.md)


## Implementation status

```{r, echo=FALSE}
# calls_data = tryCatch({
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ devtools::install_github("CIP-RIU/brapi")
How to use the package
----------------------

See [tutorial](https://github.com/CIP-RIU/brapi/blob/master/inst/doc/tutorial.Rmd).
See [tutorial](https://github.com/c5sire/brapi/blob/master/inst/doc/tutorial.Rmd).

Documentation of JSON response/requests
---------------------------------------

See the inst/apidocs directory for examples: [apidocs](https://github.com/CIP-RIU/brapi/blob/master/inst/apidocs/README.md)

Implementation status
---------------------
See the inst/apidocs directory for examples: [apidocs](https://github.com/c5sire/brapi/blob/master/inst/apidocs/README.md)
49 changes: 49 additions & 0 deletions vignettes/tutorial.R
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)
)

294 changes: 294 additions & 0 deletions vignettes/tutorial.html

Large diffs are not rendered by default.

0 comments on commit dfc105e

Please sign in to comment.