* using log directory 'd:/Rcompile/CRANpkg/local/4.4/GAPR.Rcheck' * using R version 4.4.3 (2025-02-28 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'GAPR/DESCRIPTION' ... OK * this is package 'GAPR' version '0.1.0' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'GAPR' can be installed ... OK * used C++ compiler: 'g++.exe (GCC) 13.3.0' * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [6s] OK * checking whether the package can be loaded with stated dependencies ... [5s] OK * checking whether the package can be unloaded cleanly ... [5s] OK * checking whether the namespace can be loaded with stated dependencies ... [5s] OK * checking whether the namespace can be unloaded cleanly ... [6s] OK * checking loading without being on the library search path ... [6s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [17s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking examples ... [17s] ERROR Running examples in 'GAPR-Ex.R' failed The error most likely occurred in: > ### Name: computeProximity > ### Title: Compute Proximity Matrix > ### Aliases: computeProximity > > ### ** Examples > > # ======================= > # Example 1: Crabs dataset with distance method (Euclidean distance) > # ======================= > # Step 1: Compute proximity matrix > if (requireNamespace("MASS", quietly = TRUE)) { + df_crabs <- as.matrix(MASS::crabs[, -c(1:3)]) # Use continuous variables only + row_prox_crabs <- computeProximity( + data = df_crabs, + proxType = 0, # 0 = Euclidean distance + side = 0, # 0 = row-wise proximity + isContainMissingValue = 0 + ) + + # Step 2: Obtain R2E ordering + r2e_order_crabs <- ellipse_sort(row_prox_crabs) # R2E ordering + + # Step 3: Apply AVG-R2E ordering + hctree_result_crabs <- hctree_sort( + row_prox_crabs, # use distance matrix directly + externalOrder = r2e_order_crabs, # apply r2e order + orderType = 2, # 2 = Average-linkage + flipType = 1 # 1 = Flip based on externalOrder + ) + + avg_r2e_order_crabs <- hctree_result_crabs$order + 1 + + # Inspect results + avg_r2e_order_crabs + } [1] 150 149 50 200 148 145 144 147 146 143 142 199 198 197 195 45 46 49 [19] 48 47 44 100 196 193 192 188 194 189 190 191 187 186 141 140 139 138 [37] 134 135 133 42 43 41 40 37 35 99 98 180 179 185 184 176 183 97 [55] 136 137 132 131 127 130 36 38 39 34 32 31 33 28 177 178 182 181 [73] 172 171 175 174 95 92 96 94 29 30 128 129 126 88 91 83 89 93 [91] 90 87 173 170 169 26 25 24 27 23 22 21 84 86 85 82 168 167 [109] 166 163 164 165 162 125 123 124 161 121 122 120 81 80 79 160 159 78 [127] 118 20 158 157 113 115 112 114 119 117 111 77 76 73 19 75 18 17 [145] 14 13 16 71 74 12 15 11 72 70 116 110 108 156 109 155 107 65 [163] 69 67 68 64 66 10 63 154 9 8 106 153 105 7 62 60 6 51 [181] 1 101 151 152 104 61 59 58 57 56 103 102 5 4 55 54 3 52 [199] 53 2 > > # ======================= > # Example 2: Crabs dataset with distance method (Pearson correlation) > # ======================= > if (requireNamespace("MASS", quietly = TRUE)) { + df_crabs <- as.matrix(MASS::crabs[, -c(1:3)]) # Use continuous variables only + row_prox_pearson <- computeProximity( + data = df_crabs, + proxType = 1, # 1 = Pearson correlation (internally 1 - cor) + side = 0, # 0 = row-wise proximity + isContainMissingValue = 0 + ) + + # Step 2: Obtain R2E ordering + r2e_order_pearson <- ellipse_sort(row_prox_pearson) # R2E ordering + + # Step 3: Inspect results + dist_pearson <- as.dist(1 - row_prox_pearson) # convert correlation matrix to distance matrix + dist_pearson_MT <- as.matrix(dist_pearson) + + hctree_result_pearson <- hctree_sort( + dist_pearson_MT, # use distance matrix directly + externalOrder = r2e_order_pearson, # apply r2e order + orderType = 2, # 2 = Average-linkage + flipType = 1 # 1 = Flip based on externalOrder + ) + + avg_r2e_order_pearson <- hctree_result_pearson$order + 1 + + # Inspect results + avg_r2e_order_pearson + } [1] 145 144 142 146 150 137 130 143 149 131 139 129 135 148 138 112 114 126 [19] 140 120 121 115 113 127 136 124 133 117 147 134 132 45 125 128 141 122 [37] 106 119 116 109 105 123 103 110 102 104 107 42 111 161 195 108 28 193 [55] 190 186 31 40 34 50 49 48 39 22 46 199 23 30 38 197 198 118 [73] 191 153 182 174 43 27 24 180 37 41 33 29 26 172 25 13 36 47 [91] 8 181 101 194 152 44 32 192 6 100 96 176 90 14 156 1 162 185 [109] 35 21 200 155 187 189 184 171 175 20 173 9 196 170 5 178 18 158 [127] 17 166 4 165 160 167 19 169 177 15 80 179 16 89 159 163 164 151 [145] 154 157 7 66 11 84 93 168 2 55 188 10 74 91 77 76 86 54 [163] 58 3 78 75 68 62 51 53 60 88 56 85 71 69 12 79 82 97 [181] 73 83 67 92 64 87 94 99 98 70 183 81 95 72 52 63 57 65 [199] 59 61 > > > > ### *