R CMD check NOTE: no visible global function definition for ‘.’
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with the minimal reproducible example using data.table indexing, then run devtools::check() in an R package to reproduce the NOTE for .(). Trace how the alias is handled during package checks; done means the check no longer reports a missing global function definition for . while .() remains usable in indexing.
Written by the indexing model from the issue text.
Description
The .() alias for list() within data.table indexing brackets is not recognized as a function by R CMD check, when importing data.table in an R package.
Workaround: replace .() with list() wherever it occurs
Related issues: #850, #4741
Minimal reproducible example
Within an R package:
mydt <- data.table(foo = 1, bar = 2, baz = 3)
mydt[, .(bar, baz)]
Then run in console:
devtools::check()
Output of sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] RevealBiobankUICommon_0.0.0.9000
[2] data.table_1.14.0
[3] plotly_4.9.3
[4] ggplot2_3.3.6
[5] shiny_1.7.1.55503
[6] futile.logger_1.4.3
[7] devtools_2.4.4
[8] usethis_2.1.6
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 tidyr_1.2.0 prettyunits_1.1.1
[4] ps_1.6.0 assertthat_0.2.1 rprojroot_2.0.3
[7] digest_0.6.29 utf8_1.1.4 mime_0.12
[10] R6_2.5.1 futile.options_1.0.1 httr_1.4.2
[13] pillar_1.7.0 rlang_1.0.4 curl_4.3
[16] lazyeval_0.2.2 rstudioapi_0.13 miniUI_0.1.1.1
[19] callr_3.6.0 urlchecker_1.0.1 desc_1.4.1
[22] stringr_1.4.0 htmlwidgets_1.5.3 munsell_0.5.0
[25] compiler_3.6.0 httpuv_1.6.5 xfun_0.31
[28] pkgconfig_2.0.3 pkgbuild_1.3.1 htmltools_0.5.2
[31] tidyselect_1.1.2 tibble_3.1.7 roxygen2_7.2.1
[34] viridisLite_0.3.0 fansi_0.4.2 crayon_1.5.1
[37] dplyr_1.0.8 withr_2.5.0 later_1.3.0
[40] grid_3.6.0 jsonlite_1.8.0 xtable_1.8-4
[43] gtable_0.3.0 lifecycle_1.0.1 DBI_1.1.1
[46] magrittr_2.0.3 formatR_1.7 scales_1.1.0
[49] cli_3.3.0 stringi_1.4.6 cachem_1.0.6
[52] fs_1.5.2 promises_1.2.0.1 remotes_2.4.2
[55] xml2_1.3.3 ellipsis_0.3.2 vctrs_0.3.8
[58] generics_0.1.0 lambda.r_1.2.4 rcmdcheck_1.4.0
[61] tools_3.6.0 glue_1.6.2 purrr_0.3.4
[64] processx_3.5.1 pkgload_1.3.0 fastmap_1.1.0
[67] colorspace_1.4-1 xopen_1.0.0 sessioninfo_1.2.2
[70] memoise_2.0.1 knitr_1.28 profvis_0.3.7
- Dominant language
- R
- Stars
- 3.9k
- Forks
- 1.1k
- Avg merge
- 14h 4m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Rdatatable/data.table
-
as.data.table() recurses without end on a survival::Surv object (or any data.frame carrying one) Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Rdatatable/data.table#7887 ·
-
consistency tests
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Rdatatable/data.table#7853 · 3 comments ·
-
internals
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Rdatatable/data.table#6938 · 1 comment ·
-
encoding fread
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Rdatatable/data.table#5179 · 8 comments ·
-
documentation programming
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Rdatatable/data.table#3199 · 3 comments ·
All issues in Rdatatable/data.table
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·