Skip to content
Prev 18676 / 21312 Next

[Bioc-devel] EXTERNAL: LazyData: false and accessing data in the YAML section of an Rmd document

Dear Andrew,

Thanks for your suggestion.
Loading the data explicitly in the markdown instead of the YAML section 
- appeals to me. It is desirable to show the code in the vignette if the 
vignette loads it.


However, I would like not to display the code if I pass the data using 
the params argument of the `render` function.

Therefore, I thought about the following code, which unfortunately 
Errors with BiocCheck.

```{r data-fonfig, include=FALSE}
evalAll <- is.null(params$data)
if(!evalAll ){
	data <- params$data
}
```

```{r eval = evalAll}
data(data_ionstar, package = "prolfqua")
data <- data_ionstar$data
```

Running BiocCheck produces:
* Checking library calls...
Error in eval(x, envir = envir) : object 'evalAll' not found

Best regards
Witek
On 19/11/2021 17:00, McDavid, Andrew wrote: