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

Witold Wolski wew @end|ng |rom |gcz@ethz@ch
Thu Nov 18 18:00:11 CET 2021


I guess I failed to explain:

In the yaml section of the rmarkdown I can only use a single R expression;
i.e., I can not write:
```
configuration:  !r data('somedata', package="xyz"); somedata$uvw
```
because these are two expressions.

I could write:
xyz::somedata$uvw

So to rephrase my question. What would be your recommendation to convert 
these two expressions:

data('somedata', package="xyz"); somedata$uvw

into one?

Hope this clarifies my question.

Best regards
Witek






On 18/11/2021 16:44, Marcel Ramos wrote:
> Hi Witold,
> 
> I am not sure what the use case is for loading data in the yaml header.
> If you're swapping out data for your vignettes, perhaps your introduction
> chunks could contain the code to load the data.
> 
> In any case, I recommend that you use `data("dataset", package = "package")`
> to load the data with LazyData turned off.
> 
> Best regards,
> 
> Marcel
> 
> On 11/18/21 9:51 AM, Witold Wolski wrote:
>> Hi,
>>
>> I with BiocCheck I am getting a warning that my packages uses
>> LazyData: true.
>>
>> So far some of the package vignettes loaded the data in the params
>> section of the Rmd file e.g.,
>>
>> ---
>> title:
>> ...
>> ...
>> params:
>>    configuration:  !r data(prolfqua::data_ionstar);
>> quote(prolfqua::data_ionstar$filtered()$config )
>>    project_conf: NULL
>>    data: !r quote( prolfqua::data_ionstar$filtered()$data )
>> ...
>> ---
>>
>>
>> However, this will not work with LazyData false. What is the
>> bioconductor way of loading the data in the Rmd file Yaml section?
>>
>> If anyone wonders, why do I need it. By this I can reuse the vignette
>> with a different dataset.
>>
>> Best Witold
>>
>> _______________________________________________
>> Bioc-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> 
> ---
> Marcel Ramos
> Bioconductor Core Team
> Roswell Park Comprehensive Cancer Center
> Dept. of Biostatistics & Bioinformatics
> Elm St. & Carlton St.
> Buffalo, New York 14263
> 
> 
> This email message may contain legally privileged and/or...{{dropped:4}}
> 
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>



More information about the Bioc-devel mailing list