Skip to content

how to avoid check NOTE for ..variables in j? #4741

@tdhock

Description

@tdhock

this is related to #2988
I put a line of code in R/fmelt.R

    other.values = lapply(group.dt[, ..is.other], unique)

and when I checked data.table I got

* checking R code for possible problems ... NOTE
measure: no visible binding for global variable ‘..is.other’
Undefined global functions or variables:
  ..is.other

so I tried the usual trick,

..is.other <- NULL

But that gave me this warning from R/data.table.R,

            warning("Both '",name,"' and '..", name, "' exist in calling scope. Please remove the '..", name,"' variable in calling scope for clarity.")

Eventually I removed the two dots altogether and instead used,

    other.values = lapply(group.dt[, is.other, with=FALSE], unique)

which works fine (no NOTE nor warning), but from the docs and #2826 it seems that with=FALSE will be deprecated in the future. If that is the case then how should R package developers who use ..something avoid that NOTE?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions