Message-ID: <5a1f123d-bec7-f21e-3f2c-e45c4929b071@posteo.de>
Date: 2019-02-14T08:05:48Z
From: web working
Subject: [Bioc-devel] ddply causes error during R check
In-Reply-To: <CAGfgtYD9-CsZ1H42bbZq7CoGse3RL5yT4UbiaspvqjW6TQFjZw@mail.gmail.com>
Hi Mike,
thank you for pointing out that there are other package which have the
same situation.
Tobias
Am 12.02.19 um 14:47 schrieb Mike Smith:
> 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 <webworking at posteo.de
> <mailto:webworking at 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 at r-project.org <mailto:Bioc-devel at r-project.org> mailing
> list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
[[alternative HTML version deleted]]