R Under development (unstable) (2021-01-01 r79753) -- "Unsuffered Consequences" Copyright (C) 2021 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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. Natural language support but running in an English locale 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. > pkgname <- "GreedySBTM" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('GreedySBTM') > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("CollapseLabels") > ### * CollapseLabels > > flush(stderr()); flush(stdout()) > > ### Name: CollapseLabels > ### Title: CollapseLabels > ### Aliases: CollapseLabels > > ### ** Examples > > set.seed(12345) > allocations <- matrix(sample(0:25, 25, TRUE), 5, 5) > CollapseLabels(allocations = allocations) utils_collapse_labels.cpp:19:23: runtime error: nan is outside the range of representable values of type 'unsigned int' #0 0x7f92637fe097 in cpp_CollapseLabels(arma::Col) /data/gannet/ripley/R/packages/tests-clang-SAN/GreedySBTM/src/utils_collapse_labels.cpp:19:23 #1 0x7f926375142b in GreedySBTM_cpp_CollapseLabels /data/gannet/ripley/R/packages/tests-clang-SAN/GreedySBTM/src/RcppExports.cpp:56:34 #2 0x6e397d in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:598:17 #3 0x72f2b1 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1281:11 #4 0x84cd45 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7115:14 #5 0x82b5a9 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:727:8 #6 0x895cd0 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #7 0x890ef7 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1823:16 #8 0x84f917 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7083:12 #9 0x82b5a9 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:727:8 #10 0x895cd0 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #11 0x890ef7 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1823:16 #12 0x82c3e2 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:850:12 #13 0x962b27 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2 #14 0x965f00 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:314:11 #15 0x965d29 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1113:5 #16 0x966082 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1120:5 #17 0x4de22a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #18 0x7f927450f041 in __libc_start_main (/lib64/libc.so.6+0x27041) #19 0x4312dd in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x4312dd) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils_collapse_labels.cpp:19:23 in utils_collapse_labels.cpp:22:21: runtime error: nan is outside the range of representable values of type 'unsigned int' #0 0x7f92637fe374 in cpp_CollapseLabels(arma::Col) /data/gannet/ripley/R/packages/tests-clang-SAN/GreedySBTM/src/utils_collapse_labels.cpp:22:21 #1 0x7f926375142b in GreedySBTM_cpp_CollapseLabels /data/gannet/ripley/R/packages/tests-clang-SAN/GreedySBTM/src/RcppExports.cpp:56:34 #2 0x6e397d in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:598:17 #3 0x72f2b1 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1281:11 #4 0x84cd45 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7115:14 #5 0x82b5a9 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:727:8 #6 0x895cd0 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #7 0x890ef7 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1823:16 #8 0x84f917 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7083:12 #9 0x82b5a9 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:727:8 #10 0x895cd0 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #11 0x890ef7 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1823:16 #12 0x82c3e2 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:850:12 #13 0x962b27 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2 #14 0x965f00 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:314:11 #15 0x965d29 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1113:5 #16 0x966082 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1120:5 #17 0x4de22a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #18 0x7f927450f041 in __libc_start_main (/lib64/libc.so.6+0x27041) #19 0x4312dd in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x4312dd) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils_collapse_labels.cpp:22:21 in [,1] [,2] [,3] [,4] [,5] [1,] 1 2 3 4 5 [2,] 6 3 7 8 4 [3,] 9 10 8 7 2 [4,] 2 11 12 0 13 [5,] 10 14 15 13 16 > > > > cleanEx() > nameEx("GreedyICL") > ### * GreedyICL > > flush(stderr()); flush(stdout()) > > ### Name: GreedyICL > ### Title: GreedyICL > ### Aliases: GreedyICL > > ### ** Examples > > ### A complete example is provided in the documentation of GreedyMerge. > > > > cleanEx() > nameEx("GreedyInit") > ### * GreedyInit > > flush(stderr()); flush(stdout()) > > ### Name: GreedyInit > ### Title: GreedyInit > ### Aliases: GreedyInit > > ### ** Examples > > ### A complete example is provided in the documentation of GreedyMerge. > > > > cleanEx() > nameEx("GreedyMerge") > ### * GreedyMerge > > flush(stderr()); flush(stdout()) > > ### Name: GreedyMerge > ### Title: GreedyMerge > ### Aliases: GreedyMerge > > ### ** Examples > > set.seed(12345) > data(reality_mining_84) > tframes <- dim(reality_mining_84)[3] > N <- dim(reality_mining_84)[1] > > ### Evaluate matrix containing the degrees of each node at each time > degrees <- apply(X = reality_mining_84, MARGIN = c(1,3), FUN = sum) > > ### create a binary matrix with ones corresponding to inactive nodes > inactive_nodes <- degrees == 0 > > ### create an edgelist listing all of the ids (time, node_label) of inactive nodes > n_inactive_nodes <- sum(inactive_nodes) > list_of_inactive_nodes <- matrix(NA,n_inactive_nodes,2) > index <- 1 > for (t in 1:tframes) for (i in 1:N) if (inactive_nodes[i,t]) + { + list_of_inactive_nodes[index,1] = t + list_of_inactive_nodes[index,2] = i + index = index + 1 + } > > ### Find starting allocations using k-means > allocations_init <- GreedyInit(reality_mining_84, 20, list_of_inactive_nodes) utils_collapse_labels.cpp:19:79: runtime error: nan is outside the range of representable values of type 'unsigned int' #0 0x7f92637fe312 in cpp_CollapseLabels(arma::Col) /data/gannet/ripley/R/packages/tests-clang-SAN/GreedySBTM/src/utils_collapse_labels.cpp:19:79 #1 0x7f926375142b in GreedySBTM_cpp_CollapseLabels /data/gannet/ripley/R/packages/tests-clang-SAN/GreedySBTM/src/RcppExports.cpp:56:34 #2 0x6e397d in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:598:17 #3 0x72f2b1 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1281:11 #4 0x84cd45 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7115:14 #5 0x82b5a9 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:727:8 #6 0x895cd0 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #7 0x890ef7 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1823:16 #8 0x84f917 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7083:12 #9 0x82b5a9 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:727:8 #10 0x895cd0 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #11 0x890ef7 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1823:16 #12 0x84f917 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7083:12 #13 0x82b5a9 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:727:8 #14 0x895cd0 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #15 0x890ef7 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1823:16 #16 0x82c3e2 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:850:12 #17 0x8a2739 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2969:8 #18 0x82bbfc in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:802:12 #19 0x962b27 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2 #20 0x965f00 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:314:11 #21 0x965d29 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1113:5 #22 0x966082 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1120:5 #23 0x4de22a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #24 0x7f927450f041 in __libc_start_main (/lib64/libc.so.6+0x27041) #25 0x4312dd in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x4312dd) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils_collapse_labels.cpp:19:79 in > > ### Run the GreedyICL algorithm (this may take some time) > output_greedy <- GreedyICL(reality_mining_84, allocations_init, max_n_iter = 1) > ### max_n_iter is set to 1 to speed up the demonstration: > ### please always use max_n_iter = 100 in applications > > ### Run the hierarchical clustering routine > output_merge <- GreedyMerge(adj_cube = reality_mining_84, allocations = output_greedy$allocations) > str(output_merge) List of 4 $ computing_time: num 1.85 $ icl_start : num -12536 $ icl_end : num -11603 $ allocations : num [1:84, 1:93] 19 0 0 19 19 19 0 0 0 0 ... > > > > > cleanEx() > nameEx("ICLExact") > ### * ICLExact > > flush(stderr()); flush(stdout()) > > ### Name: ICLExact > ### Title: ICLExact > ### Aliases: ICLExact > > ### ** Examples > > set.seed(12345) > data(reality_mining_84) > tframes <- dim(reality_mining_84)[3] > N <- dim(reality_mining_84)[1] > allocations <- matrix(sample(1:10,tframes*N,TRUE),tframes,N) > ICLExact(adj_cube = reality_mining_84, allocations = allocations, verbose = FALSE) $computing_time [1] 0.07510192 $prior_value [1] -18187.17 $likelihood_value [1] -15857.81 $icl_value [1] -34044.98 > > > > ### *