Skip to content

Commit

Permalink
update vignette
Browse files Browse the repository at this point in the history
- move cached to shorter path
- stop requesting png in vignette as doesnt work with cache
  • Loading branch information
grlloyd committed Sep 22, 2023
1 parent d97f93f commit f6f06da
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 4 deletions.
18 changes: 14 additions & 4 deletions vignettes/Introduction_to_metabolomicsWorkbenchR.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ vignette: >
suppressPackageStartupMessages(library(grid))
suppressPackageStartupMessages(library(httptest))
suppressPackageStartupMessages(library(metabolomicsWorkbenchR))
httptest::set_requester(
function(request){
httptest::gsub_request(request,'https\\://www.metabolomicsworkbench.org/rest',"mb/")
}
)
httptest::set_redactor(
function(response){
httptest::gsub_response(response,'https\\://www.metabolomicsworkbench.org/rest',"mb/")
}
)
httptest::start_vignette('introduction')
```

Expand Down Expand Up @@ -94,16 +107,13 @@ df[,1:3]
```
We can also request an image of the molecular structure:

```{r}
```{r,eval=FALSE}
img = do_query(
context = 'compound',
input_item = 'regno',
input_value = '11',
output_item = 'png'
)
grid.raster(img)
```

Valid contexts, input items and output items can be listed using the `names` function:
Expand Down
13 changes: 13 additions & 0 deletions vignettes/example_using_structToolbox.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ vignette: >
suppressPackageStartupMessages(library(structToolbox))
suppressPackageStartupMessages(library(httptest))
suppressPackageStartupMessages(library(metabolomicsWorkbenchR))
httptest::set_requester(
function(request){
httptest::gsub_request(request,'https\\://www.metabolomicsworkbench.org/rest',"mb/")
}
)
httptest::set_redactor(
function(response){
httptest::gsub_response(response,'https\\://www.metabolomicsworkbench.org/rest',"mb/")
}
)
httptest::start_vignette('structToolbox_example')
```

Expand Down

0 comments on commit f6f06da

Please sign in to comment.