@@ -8,10 +8,14 @@ The rOpenSci traits package makes it easier to query the TERRA REF trait databas
88
99Install the traits package
1010
11- The traits package is on CRAN, and can therefore be installed using the following command:
11+ The traits package can be installed through github using the following command:
1212
1313``` {r install_traits, echo = TRUE, message = FALSE}
14- install.packages('traits', repos = 'http://cran.rstudio.com/')
14+
15+ if(packageVersion("traits") == '0.2.0'){
16+ devtools::install_github('ropensci/traits')
17+ }
18+
1519```
1620
1721Load other packages that we will need to get started.
@@ -44,7 +48,7 @@ The R traits package is an API 'client'. It does two important things:
4448
4549Lets start with the query of information about Sorghum from species table from above
4650
47- ``` {r query-species, echo = TRUE}
51+ ``` {r query-species, results = 'hide', echo = TRUE}
4852
4953sorghum_info <- betydb_query(table = 'species',
5054 genus = "Sorghum",
@@ -69,7 +73,7 @@ options(betydb_key = readLines('.betykey', warn = FALSE),
6973
7074Now the same query can be reduced to:
7175
72- ``` {r query-species-reduce, echo = TRUE}
76+ ``` {r query-species-reduce, message = FALSE, echo = TRUE}
7377sorghum_info <- betydb_query(table = 'species',
7478 genus = "Sorghum",
7579 limit = 'none')
@@ -78,7 +82,7 @@ sorghum_info <- betydb_query(table = 'species',
7882### Time series of height
7983
8084Now let's query some trait data.
81- ``` {r canopy_height, echo = TRUE, results = FALSE}
85+ ``` {r canopy_height, echo = TRUE, message = FALSE}
8286sorghum_height <- betydb_query(table = 'search',
8387 trait = "canopy_height",
8488 sitename = "~Season 2",
0 commit comments