Rdatatable / data.table

R's data.table package extends data.frame:
http://r-datatable.com
Mozilla Public License 2.0
3.62k stars 985 forks source link

merge resulting in "Error in isReallyReal(by): x must be of type double." #3064

Closed pmgurman closed 6 years ago

pmgurman commented 6 years ago

Hi All,

Odd error with data.table version 1.11.6 downloaded from CRAN a couple of days ago.

library(data.table)

a <- data.table(a = c("a","b"), b = c(1,2))
b <- data.table(a = c("a","b"), b = c(1,3))

merge(a,b, by = "a")

resulting in

#> Error in isReallyReal(by): x must be of type double.

sessionInfo() below

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)

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.6

loaded via a namespace (and not attached):
[1] compiler_3.5.

I am guessing it is a problem using a character column as a key? I also tried running the current 1.11.7, with the same result. Any ideas?

MichaelChirico commented 6 years ago

can you try closing all R sessions and reinstalling first?

On Mon, Sep 24, 2018, 7:45 AM pmgurman notifications@github.com wrote:

Hi All,

Odd error with data.table version 1.11.6 downloaded from CRAN a couple of days ago.

library(data.table)

a <- data.table(a = c("a","b"), b = c(1,2)) b <- data.table(a = c("a","b"), b = c(1,3))

merge(a,b, by = "a")

resulting in

> Error in isReallyReal(by): x must be of type double.

sessionInfo() below

R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 16299)

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.6

loaded via a namespace (and not attached): [1] compiler_3.5.

I am guessing it is a problem using a character column as a key? I also tried running the current 1.11.7, with the same result. Any ideas?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Rdatatable/data.table/issues/3064, or mute the thread https://github.com/notifications/unsubscribe-auth/AHQQdeds2GKGHji9oveffGiP1g-A9H7Jks5ueB0CgaJpZM4W17yP .

pmgurman commented 6 years ago

Ok that solved it. Thank you.

basudev2016 commented 6 years ago

Hi, I am trying to convert the output of udpipe_annotate to a data frame and getting this error "Error in isReallyReal(by) : x must be of type double." my session info are:-

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

Matrix products: default

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

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

other attached packages: [1] data.table_1.11.8 gtools_3.5.0 udpipe_0.6.1 openNLP_0.2-6 coreNLP_0.4-2 cleanNLP_2.0.3 dplyr_0.7.5
[8] lubridate_1.7.4 quanteda_1.3.4 sqldf_0.4-11 RSQLite_2.1.1 gsubfn_0.7 proto_1.0.0 RWeka_0.4-39
[15] rJava_0.9-10 tm_0.7-5 NLP_0.1-11

loaded via a namespace (and not attached): [1] Rcpp_0.12.19 lattice_0.20-35 assertthat_0.2.0 digest_0.6.15 slam_0.1-43 R6_2.2.2
[7] plyr_1.8.4 chron_2.3-52 ggplot2_3.0.0 pillar_1.2.3 RWekajars_3.9.3-1 rlang_0.2.1
[13] lazyeval_0.2.1 blob_1.1.1 Matrix_1.2-14 stringr_1.3.1 bit_1.1-14 munsell_0.5.0
[19] compiler_3.5.1 spacyr_0.9.91 pkgconfig_2.0.1 tcltk_3.5.1 tidyselect_0.2.4 tibble_1.4.2
[25] XML_3.98-1.11 grid_3.5.1 gtable_0.2.0 DBI_1.0.0 magrittr_1.5 scales_0.5.0
[31] RcppParallel_4.4.1 stringi_1.1.7 bindrcpp_0.2.2 openNLPdata_1.5.3-4 xml2_1.2.0 stopwords_0.9.0
[37] fastmatch_1.1-0 tools_3.5.1 bit64_0.9-7 glue_1.2.0 purrr_0.2.5 parallel_3.5.1
[43] yaml_2.2.0 colorspace_1.3-2 memoise_1.1.0 bindr_0.1.1

MichaelChirico commented 6 years ago

@basudev2016 please make sure your work flow is fully reproducible and file a new issue with more details.