duplicate names on simple operation
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the issue's toy data and dt[, mean(V2), by = V1] operation with the reported data.table and R versions. Trace the column-name handling involved in that operation, then add or update coverage so the result no longer contains duplicate V1 names.
Written by the indexing model from the issue text.
Description
Today data.table returned a double V1 name upon a simple operation:
Toy data
dt <- fread("A 2
+ B 3
+ C 4
+ D 5")
operation produces two columns named V1
dt[, mean(V2), by = V1]
V1 V1
1: A 2
2: B 3
3: C 4
4: D 5
Session info:
sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.7.0
LAPACK: /usr/lib/lapack/liblapack.so.3.7.0
locale:
[1] LC_CTYPE=es_CO.UTF-8 LC_NUMERIC=C LC_TIME=es_CO.UTF-8 LC_COLLATE=es_CO.UTF-8
[5] LC_MONETARY=es_CO.UTF-8 LC_MESSAGES=es_CO.UTF-8 LC_PAPER=es_CO.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=es_CO.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] zoo_1.8-5 ggplot2_3.1.1 lubridate_1.7.4 data.table_1.12.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 rstudioapi_0.10 magrittr_1.5 hms_0.4.2 tidyselect_0.2.5 munsell_0.5.0
[7] lattice_0.20-38 colorspace_1.4-1 R6_2.4.0 rlang_0.3.4 plyr_1.8.4 stringr_1.4.0
[13] dplyr_0.8.1 tools_3.6.0 grid_3.6.0 gtable_0.3.0 withr_2.1.2 digest_0.6.19
[19] lazyeval_0.2.2 assertthat_0.2.1 tibble_2.1.1 crayon_1.3.4 purrr_0.3.2 glue_1.3.1
[25] labeling_0.3 stringi_1.4.3 compiler_3.6.0 pillar_1.4.0 scales_1.0.0 pkgconfig_2.0.2
Iit seems related to one of the entries in https://github.com/Rdatatable/data.table/issues/3193 (the one by @Atrebas)
- 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 ·