R Under development (unstable) (2025-01-15 r87581) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > if (require(RUnit)) { + library(FeatureHashing) + df <- data.frame(a = rnorm(3), b = c("1,2", "1,,3", ",2,3"), stringsAsFactors = FALSE) + m <- hashed.model.matrix(~ a * split(b), df, create.mapping = TRUE) + mapping <- attr(m, "mapping") + checkTrue(!"b" %in% ls(mapping), "the output contains the column corresponding to empty string") + df$b <- factor(df$b) + m <- hashed.model.matrix(~ a * split(b), df, create.mapping = TRUE) + mapping <- attr(m, "mapping") + checkTrue(!"b" %in% ls(mapping), "the output contains the column corresponding to empty string") + } Loading required package: RUnit pmurhash.c:224:19: runtime error: left shift of 142 by 24 places cannot be represented in type 'int' #0 0x7f6f19d2efdb in PMurHash32_Process /tmp/Rtmpaf6nF0/R.INSTALL4647c2dfdae57/digest/src/pmurhash.c:224 #1 0x7f6f19d2f4c9 in PMurHash32 /tmp/Rtmpaf6nF0/R.INSTALL4647c2dfdae57/digest/src/pmurhash.c:312 #2 0x7f6f14e90e99 in MurmurHash3LogHashFunction::operator()(char const*, int, bool) /data/gannet/ripley/R/packages/tests-gcc-SAN/FeatureHashing/src/hash_function.h:78 #3 0x7f6f14e7dd85 in InteractionConverter::get_hashed_feature(HashFunction*, unsigned int, unsigned int) /data/gannet/ripley/R/packages/tests-gcc-SAN/FeatureHashing/src/vector_converter.h:537 #4 0x7f6f14e7dd85 in InteractionConverter::get_feature(unsigned long) /data/gannet/ripley/R/packages/tests-gcc-SAN/FeatureHashing/src/vector_converter.h:497 #5 0x7f6f14ecdc50 in SEXPREC* hashed_model_matrix >(Rcpp::RObject_Impl, Rcpp::DataFrame_Impl, unsigned long, bool, Rcpp::S4_Impl, bool, bool, bool) /data/gannet/ripley/R/packages/tests-gcc-SAN/FeatureHashing/src/hashed_model_matrix.cpp:257 #6 0x7f6f14e76cc1 in hashed_model_matrix_dataframe(Rcpp::RObject_Impl, Rcpp::DataFrame_Impl, unsigned long, bool, Rcpp::S4_Impl, bool, bool, bool) /data/gannet/ripley/R/packages/tests-gcc-SAN/FeatureHashing/src/hashed_model_matrix.cpp:318 #7 0x7f6f14e3306b in _FeatureHashing_hashed_model_matrix_dataframe /data/gannet/ripley/R/packages/tests-gcc-SAN/FeatureHashing/src/RcppExports.cpp:105 #8 0x723715 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:780 #9 0x73aff2 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1437 #10 0x8a7243 in bcEval_loop /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8122 #11 0x87840f in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7505 #12 0x83f152 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167 #13 0x84a122 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2393 #14 0x83daca in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2306 #15 0x83f7d6 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2328 #16 0x83f7d6 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1280 #17 0x8632c6 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3571 #18 0x83fc06 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1232 #19 0x84f303 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3000 #20 0x83fc06 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1232 #21 0x83fc06 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1232 #22 0x9c9699 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:265 #23 0x9c9699 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:317 #24 0x9cab9b in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1219 #25 0x9d5112 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1226 #26 0x4293ff in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29 #27 0x7f6f2b22950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c) #28 0x7f6f2b2295c8 in __libc_start_main_alias_2 (/lib64/libc.so.6+0x295c8) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c) #29 0x429de4 in _start (/data/gannet/ripley/R/gcc-SAN3/bin/exec/R+0x429de4) (BuildId: 5e148b08f50883e4fe61db372b4722d6e52a85b3) [1] TRUE > > proc.time() user system elapsed 18.160 0.812 52.866