UCLouvain-CBIO / scp

Single cell proteomics data processing
https://uclouvain-cbio.github.io/scp/index.html
21 stars 2 forks source link

No visible binding for global variable notes #6

Closed lgatto closed 4 years ago

lgatto commented 4 years ago

There are several NOTES during checking

computeFDR: no visible binding for global variable ‘.assay’
computeMedianCV: no visible binding for global variable ‘value’
computeMedianCV: no visible binding for global variable ‘norm_q1’
computeMedianCV: no visible binding for global variable ‘SampleType’
computeMedianCV: no visible binding for global variable ‘norm_q’
computeMedianCV: no visible binding for global variable ‘norm_q_sd’
computeMedianCV: no visible binding for global variable ‘norm_q_mean’
computeMedianCV: no visible binding for global variable ‘cvn’
computeMedianCV: no visible binding for global variable ‘cvq’
computeMedianCV: no visible binding for global variable ‘MedianCV’
Undefined global functions or variables:
  .assay cvn cvq MedianCV norm_q norm_q_mean norm_q_sd norm_q1
  SampleType value

This is to be expected when using non-standard evaluation in dplyr or ggplot2. For example in

x %>% arrange(foo, bar)

foo and bar are variables in x and aren't visible on their own.

This actually points to the issues of using these packages within packages. See

cvanderaa commented 4 years ago

Thanks for the links!

I see I can quickly solve this issue if I import and use the .data prototype. But is your advice to not use the tidyverse functionality in a package?

lgatto commented 4 years ago

I think it should be avoided with NSE. Using it with a programmatic interface, as suggested in the links should be fine, I think.

cvanderaa commented 4 years ago

Ok, this should be fixed now!