Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SET_STRING_ELT error when rbindlist contains both tables with ordered factors of different levels and tables with ordered factors of common levels #3032

Closed
HughParsonage opened this issue Sep 5, 2018 · 0 comments · Fixed by #3455
Labels
Milestone

Comments

@HughParsonage
Copy link
Member

Related issue #899 was closed in 67ace19

# Minimal reproducible example

library(data.table)
# data.table 1.11.5 IN DEVELOPMENT built 2018-09-05 02:11:00 UTC; appveyor  Latest news: r-datatable.com

dt1 <- data.table(x = as.ordered(letters[c(1, 3, 5:8)]))
dt2 <- data.table(x = as.ordered(letters[c(2, 5:8)]))
dt3 <- data.table(x = as.ordered(letters[c(2, 5:8)]))

rbindlist(list(dt1, dt2, dt3), use.names = TRUE, fill = TRUE)
#> Error in rbindlist(list(dt1, dt2, dt3), use.names = TRUE, fill = TRUE):
#>   attempt to set index 7/7 in SET_STRING_ELT

Created on 2018-09-06 by the reprex package (v0.2.0).

# Output of sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] data.table_1.11.5

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.18     ps_1.1.0         rprojroot_1.3-2  digest_0.6.16   
 [5] crayon_1.3.4     withr_2.1.2      assertthat_0.2.0 R6_2.2.2        
 [9] backports_1.1.2  magrittr_1.5     reprex_0.2.0     evaluate_0.11   
[13] stringi_1.1.7    rlang_0.2.2      rstudioapi_0.7   callr_3.0.0     
[17] whisker_0.3-2    rmarkdown_1.10   devtools_1.13.6  tools_3.5.1     
[21] stringr_1.3.1    yaml_2.2.0       compiler_3.5.1   processx_3.2.0  
[25] base64enc_0.1-3  clipr_0.4.1      htmltools_0.3.6  memoise_1.1.0   
[29] knitr_1.20 
@HughParsonage HughParsonage changed the title SET_STRING_ELT error when rbindlist contains both tables with ordered factors of different levels and tables of common levels SET_STRING_ELT error when rbindlist contains both tables with ordered factors of different levels and tables with ordered factors of common levels Sep 5, 2018
@mattdowle mattdowle added this to the 1.12.2 milestone Mar 14, 2019
@mattdowle mattdowle mentioned this issue Mar 14, 2019
8 tasks
mattdowle added a commit that referenced this issue Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants