Skip to content

Commit b9dde01

Browse files
committed
changed some chunk parameters and added repository for traits installation
1 parent 3ff3e25 commit b9dde01

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

traits/03-access-r-traits.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Install the traits package
1010

1111
The traits package is on CRAN, and can therefore be installed using the following command:
1212

13-
```{r install_traits, echo = FALSE, include = FALSE}
14-
install.packages('traits')
13+
```{r install_traits, echo = TRUE, message = FALSE}
14+
install.packages('traits', repos = 'http://cran.rstudio.com/')
1515
```
1616

1717
Load other packages that we will need to get started.
1818

19-
```{r 00-setup, message = FALSE}
19+
```{r 00-setup, message = FALSE, echo = TRUE}
2020
library(traits)
2121
library(ggplot2)
2222
library(ggthemes)
@@ -26,14 +26,14 @@ library(dplyr)
2626

2727
Create a file that contains your API key. If you have signed up for access to the TERRA REF database, your API key will have been sent to you in an email. The public key will provide access to all metadata; you will need a personal key _and_ permissions to access the trait data. If you receive empty (NULL) datasets, it is likely that you do not have permissions.
2828

29-
```{r writing-key}
29+
```{r writing-key, echo = TRUE}
3030
# This should be done once with the key sent to you in your email
3131
# writeLines('abcdefg_rest_of_key_sent_in_email',
3232
# con = '.betykey')
3333
3434
# Example with the public key:
3535
writeLines('9999999999999999999999999999999999999999',
36-
con = '.betykey_public')
36+
con = 'traits/.betykey_public')
3737
```
3838

3939
#### R - using the traits package
@@ -69,7 +69,7 @@ options(betydb_key = readLines('traits/.betykey', warn = FALSE),
6969

7070
Now the same query can be reduced to:
7171

72-
```{r query-species-reduce, echo = TRUE}
72+
```{r query-species-reduce, echo = TRUE, results = FALSE}
7373
sorghum_info <- betydb_query(table = 'species',
7474
genus = "Sorghum",
7575
limit = 'none')

0 commit comments

Comments
 (0)