alexsanjoseph / compareDF

R Tool to compare two data.frames
Other
93 stars 17 forks source link

Error occured when comparing two tibbles. #2

Closed psychelzh closed 7 years ago

psychelzh commented 7 years ago

Your work is very useful. But I encountered an error while I call the following code to compare two tibbles wideDataBySdk and wideDataByMatlab

res <- compare_df(wideDataBySdk, select(wideDataByMatlab, one_of(colnames(wideDataBySdk))), 'userId')

Error information was as follows:

Creating comparison table...
|================================================================================================ |100% ~0 s remaining     
Truncating HTML diff table to 100 rows...
Creating HTML table for first 100 rows
Error in compare_df(wideDataBySdk, select(wideDataByMatlab, one_of(colnames(wideDataBySdk))),  : 
  Assertion failed. One of the following must apply:
 * check_matrix(css.cell): Must be of type 'matrix', not 'data.frame'
 * check_character(css.cell): Must be of type 'character', not 'data.frame'

R session information was:

R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

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

other attached packages:
 [1] compareDF_1.0.0      devtools_1.12.0      compare_0.2-6        RJSONIO_1.3-0        readxl_0.1.1        
 [6] readr_1.0.0          reshape2_1.4.2       dplyr_0.5.0          plyr_1.8.4           RevoUtilsMath_10.0.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.8      rstudioapi_0.6   knitr_1.15.1     magrittr_1.5     R6_2.2.0         stringr_1.1.0    httr_1.2.1      
 [8] tools_3.3.2      htmlTable_1.8    checkmate_1.8.2  DBI_0.5-1        git2r_0.18.0     withr_1.0.2      lazyeval_0.2.0  
[15] assertthat_0.1   digest_0.6.11    tibble_1.2       curl_2.3         memoise_1.0.0    stringi_1.1.2    RevoUtils_10.0.2
[22] backports_1.0.4
alexsanjoseph commented 7 years ago

@Psychelzh

I am not able to reproduce the error. Can you give me an example where you had the error?

alexsanjoseph commented 7 years ago

Nevermind, it was an issue with one of the dependancy packages. I have fixed it in github. Can you check? CRAN version will be updated soon!

psychelzh commented 7 years ago

Thank you very much! I will try to update it through GitHub.

psychelzh commented 7 years ago

@alexsanjoseph Thanks! I have tried updating and it solved this issue! šŸ„‡