If you're sure these are false positives (and it looks like they are) then
you can use utils::globalVariables() outside of your function to get rid of
the note.  It might also be worth pointing out that there are also plenty
of Bioconductor packages that don't do this and simply have this mentioned
in the check results e.g
http://bioconductor.org/checkResults/devel/bioc-LATEST/beadarray/malbec2-checksrc.html
 .

Mike

On Tue, 12 Feb 2019 at 08:35, web working <webwork...@posteo.de> wrote:

> Hi,
>
> I am developing a Bioconductor package and can not get rid of some
> warning messages. During devtools::check() I get the following warning
> messages:
>
> ...
> summarizeDataFrame: no visible binding for global variable ‘name’
> summarizeDataFrame: no visible binding for global variable ‘gene’
> summarizeDataFrame: no visible binding for global variable ‘value’
> ...
>
> Here a short version of the function:
>
> #' Collapse rows with duplicated name column
> #'
> #' @param dat a \cite{tibble} with the columns name, gene and value
> #' @importFrom plyr ddply
> #' @import tibble
> #' @return a \cite{tibble}
> #' @export
> #'
> #' @examples
> #' dat <- tibble(name = c(paste0("position", 1:5), paste0("position",
> c(1:3))), gene = paste0("gene", 1:8), value = 1:8)
> #' summarizeDataFrame(dat)
> summarizeDataFrame <- function(dat){
>    ddply(dat, "name", "summarize",
>          name=unique(name),
>          gene=paste(unique(gene), collapse = ","),
>          value=mean(value))
> }
>
> R interprets the "name", "gene" and "value" column names as variables
> during the check. Does anyone has an idea how to change the syntax of
> ddply or how to get rid of the warning message?
>
> Thanks in advance!
>
> Tobias
>
> _______________________________________________
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

        [[alternative HTML version deleted]]

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to