* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/tropicalSparse.Rcheck’ * using R Under development (unstable) (2022-04-26 r82260) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘tropicalSparse/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘tropicalSparse’ 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘tropicalSparse’ can be installed ... [7s/21s] 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 R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... 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 ... [15s/55s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... 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 LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking examples ... ERROR Running examples in ‘tropicalSparse-Ex.R’ failed The error most likely occurred in: > ### Name: tropicalsparse.axpyi > ### Title: tropicalsparse.axpyi() > ### Aliases: tropicalsparse.axpyi > > ### ** Examples > > a <- c(2, Inf, 5, 0, Inf, Inf, Inf, 10, Inf) > b <- c(0, 5, Inf, Inf, 12, 2, Inf, Inf, 3) > alpha <- 5 > > tropicalsparse.axpyi(a, alpha, b, 'minplus') ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- tropicalSparse --- call from context --- tropicalsparse.add(y, tropicalsparse.mul(x, alpha, algebraType = algebraType), algebraType = algebraType) --- call from argument --- A != Inf || B != Inf --- R stacktrace --- where 1: tropicalsparse.add(y, tropicalsparse.mul(x, alpha, algebraType = algebraType), algebraType = algebraType) where 2: tropicalsparse.axpyi(a, alpha, b, "minplus") --- value of length: 9 type: logical --- [1] TRUE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE --- function from context --- function (A, B, store = NULL, algebraType) { if (algebraType == "minplus") { if (is.matrix(A) && is.matrix(B)) { if (nrow(A) != nrow(B) || ncol(A) != ncol(B)) { stop("non-conformable arguments") } if (is.null(store)) { check.infinityM(A, algebraType) check.infinityM(B, algebraType) result = matrix(Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) i = 1 repeat { if (i > nrow(A)) break j = 1 repeat { if (j > ncol(A)) break result[i, j] = min(A[i, j], B[i, j]) j = j + 1 } i = i + 1 } return(result) } else if (store == "coo") { counterA <- counter(A) counterB <- counter(B) COOA <- tropicalsparse.storage(A, "coo", algebraType) if (is.matrix(COOA)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_IndicesA_COO = COOA[[1]] col_IndicesA_COO = COOA[[2]] valuesA_COO = COOA[[3]] COOB = tropicalsparse.storage(B, "coo", algebraType) if (is.matrix(COOB)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_IndicesB_COO = COOB[[1]] col_IndicesB_COO = COOB[[2]] valuesB_COO = COOB[[3]] result = matrix(Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) if (counterA > counterB) { max = counterA } else { max = counterB } x = 1 repeat { if (x > max) { break } if (x <= counterA) { i = row_IndicesA_COO[x] j = col_IndicesA_COO[x] y = 1 fnd = 0 while (y <= counterB) { if (i == row_IndicesB_COO[y] && j == col_IndicesB_COO[y]) { result[i, j] = min(valuesA_COO[x], valuesB_COO[y]) fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesA_COO[x] } } if (x <= counterB) { i = row_IndicesB_COO[x] j = col_IndicesB_COO[x] y = 1 fnd = 0 while (y <= counterA) { if (i == row_IndicesA_COO[y] && j == col_IndicesA_COO[y]) { fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesB_COO[x] } } x = x + 1 } return(result) } else if (store == "csr") { counterA <- counter(A) counterB <- counter(B) CSRA <- tropicalsparse.storage(A, "csr", algebraType) if (is.matrix(CSRA)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_PointerA_CSR = CSRA[[1]] col_IndicesA_CSR = CSRA[[2]] valuesA_CSR = CSRA[[3]] CSRB <- tropicalsparse.storage(B, "csr", algebraType) if (is.matrix(CSRB)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_PointerB_CSR = CSRB[[1]] col_IndicesB_CSR = CSRB[[2]] valuesB_CSR = CSRB[[3]] result = matrix(Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) if (counterA > counterB) { max = counterA } else { max = counterB } x = 1 repeat { if (x > max) { break } if (x <= counterA) { i = row.col.Number(x, nrow(A), row_PointerA_CSR) j = col_IndicesA_CSR[x] y = 1 fnd = 0 while (y <= counterB) { if (i == row.col.Number(y, nrow(B), row_PointerB_CSR) && j == col_IndicesB_CSR[y]) { result[i, j] = min(valuesA_CSR[x], valuesB_CSR[y]) fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesA_CSR[x] } } if (x <= counterB) { i = row.col.Number(x, nrow(B), row_PointerB_CSR) j = col_IndicesB_CSR[x] y = 1 fnd = 0 while (y <= counterA) { if (i == row.col.Number(y, nrow(A), row_PointerA_CSR) && j == col_IndicesA_CSR[y]) { fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesB_CSR[x] } } x = x + 1 } return(result) } else if (store == "csc") { counterA <- counter(A) counterB <- counter(B) CSCA <- tropicalsparse.storage(A, "csc", algebraType) if (is.matrix(CSCA)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_PointerA_CSC = CSCA[[1]] row_IndicesA_CSC = CSCA[[2]] valuesA_CSC = CSCA[[3]] CSCB <- tropicalsparse.storage(B, "csc", algebraType) if (is.matrix(CSCB)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_PointerB_CSC = CSCB[[1]] row_IndicesB_CSC = CSCB[[2]] valuesB_CSC = CSCB[[3]] result = matrix(Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) if (counterA > counterB) { max = counterA } else { max = counterB } x = 1 repeat { if (x > max) { break } if (x <= counterA) { i = row_IndicesA_CSC[x] j = row.col.Number(x, ncol(A), col_PointerA_CSC) y = 1 fnd = 0 while (y <= counterB) { if (i == row_IndicesB_CSC[y] && j == row.col.Number(y, ncol(B), col_PointerB_CSC)) { result[i, j] = min(valuesA_CSC[x], valuesB_CSC[y]) fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesA_CSC[x] } } if (x <= counterB) { i = row_IndicesB_CSC[x] j = row.col.Number(x, ncol(B), col_PointerB_CSC) y = 1 fnd = 0 while (y <= counterA) { if (i == row_IndicesA_CSC[y] && j == row.col.Number(y, ncol(A), col_PointerA_CSC)) { fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesB_CSC[x] } } x = x + 1 } return(result) } else { stop("Invalid Storage Format") } } else if (is.matrix(A) && is.vector(B) || is.matrix(B) && is.vector(A)) { if (is.matrix(B) && is.vector(A)) { temp = A A = B B = temp } if (is.null(store)) { check.infinityM(A, algebraType) check.infinityV(B, algebraType) if (length(B) == 1) { if (!is.infinite(B)) { i = 1 while (i <= nrow(A)) { j = 1 while (j <= ncol(A)) { A[i, j] = min(A[i, j], B) j = j + 1 } i = i + 1 } } return(A) } else if (nrow(A) == length(B)) { i = 1 while (i <= ncol(A)) { j = 1 while (j <= length(B)) { if (A[j, i] != Inf || B[j] != Inf) { A[j, i] = min(A[j, i], B[j]) } j = j + 1 } i = i + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else if (store == "coo") { if (length(B) == 1) { if (B != Inf) { result = matrix(B, nrow = nrow(A), ncol = ncol(A)) COO <- tropicalsparse.storage(A, "coo", algebraType) if (is.matrix(COO)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Indices_COO = COO[[1]] col_Indices_COO = COO[[2]] values_COO = COO[[3]] x = 1 while (x <= length(values_COO)) { i = row_Indices_COO[x] j = col_Indices_COO[x] result[i, j] = min(B, values_COO[x]) x = x + 1 } return(result) } return(A) } else if (nrow(A) == length(B)) { COO <- tropicalsparse.storage(A, "coo", algebraType) if (is.matrix(COO)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Indices_COO = COO[[1]] col_Indices_COO = COO[[2]] values_COO = COO[[3]] x1 = 1 x = 1 while (x <= nrow(A)) { y = 1 while (y <= ncol(A)) { i = row_Indices_COO[x1] j = col_Indices_COO[x1] if (!(is.na(i))) { if (i == x && j == y) { if (x1 <= length(values_COO)) { A[i, j] = min(B[x], values_COO[x1]) x1 = x1 + 1 } } else { A[x, y] = B[x] } } else { A[x, y] = B[x] } y = y + 1 } x = x + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else if (store == "csr") { if (length(B) == 1) { if (B != Inf) { result = matrix(B, nrow = nrow(A), ncol = ncol(A)) CSR <- tropicalsparse.storage(A, "csr", algebraType) if (is.matrix(CSR)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Pointer_CSR = CSR[[1]] col_Indices_CSR = CSR[[2]] values_CSR = CSR[[3]] x = 1 while (x <= length(values_CSR)) { i = row.col.Number(x, nrow(A), row_Pointer_CSR) j = col_Indices_CSR[x] result[i, j] = min(B, values_CSR[x]) x = x + 1 } return(result) } return(A) } else if (nrow(A) == length(B)) { CSR <- tropicalsparse.storage(A, "csr", algebraType) if (is.matrix(CSR)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Pointer_CSR = CSR[[1]] col_Indices_CSR = CSR[[2]] values_CSR = CSR[[3]] x1 = 1 x = 1 while (x <= nrow(A)) { y = 1 while (y <= ncol(A)) { i = row.col.Number(x1, nrow(A), row_Pointer_CSR) j = col_Indices_CSR[x1] if (!(is.na(i)) && !(is.na(j))) { if (i == x && j == y) { if (x1 <= length(values_CSR)) { A[i, j] = min(B[x], values_CSR[x1]) x1 = x1 + 1 } } else { A[x, y] = B[x] } } else { A[x, y] = B[x] } y = y + 1 } x = x + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else if (store == "csc") { if (length(B) == 1) { if (B != Inf) { result = matrix(B, nrow = nrow(A), ncol = ncol(A)) CSC <- tropicalsparse.storage(A, "csc", algebraType) if (is.matrix(CSC)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_Pointer_CSC = CSC[[1]] row_Indices_CSC = CSC[[2]] values_CSC = CSC[[3]] x = 1 while (x <= length(values_CSC)) { i = row_Indices_CSC[x] j = row.col.Number(x, ncol(A), col_Pointer_CSC) result[i, j] = min(B, values_CSC[x]) x = x + 1 } return(result) } return(A) } else if (nrow(A) == length(B)) { CSC <- tropicalsparse.storage(A, "csc", algebraType) if (is.matrix(CSC)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_Pointer_CSC = CSC[[1]] row_Indices_CSC = CSC[[2]] values_CSC = CSC[[3]] x1 = 1 x = 1 while (x <= ncol(A)) { y = 1 while (y <= nrow(A)) { i = row_Indices_CSC[x1] j = row.col.Number(x1, ncol(A), col_Pointer_CSC) if (!(is.na(i)) && !(is.na(j))) { if (i == y && j == x) { if (x1 <= length(values_CSC)) { A[i, j] = min(B[y], values_CSC[x1]) x1 = x1 + 1 } } else { A[y, x] = B[y] } } else { A[y, x] = B[y] } y = y + 1 } x = x + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else { stop("Invalid storage format") } } else if (is.vector(A) && is.vector(B)) { if (!is.null(store)) { stop("Store argument must be NULL in Vector-Vector addition.") } check.infinityV(A, algebraType) check.infinityV(B, algebraType) if ((length(A) == 1 && length(B) > 1) || (length(B) == 1 && length(A) > 1)) { if (length(B) == 1 && length(A) > 1) { temp = A A = B B = temp } if (A != Inf) { i = 1 repeat { if (i > length(B)) break B[i] = min(A, B[i]) i = i + 1 } } return(B) } else { if (length(A) == length(B)) { i = 1 repeat { if (i > length(B)) break if (A != Inf || B != Inf) { A[i] = min(A[i], B[i]) } i = i + 1 } return(A) } stop("non-conformable arguments") } } else { stop("Invalid Input") } } else if (algebraType == "maxplus") { if (is.matrix(A) && is.matrix(B)) { if (nrow(A) != nrow(B) || ncol(A) != ncol(B)) { stop("non-conformable arguments") } if (is.null(store)) { check.infinityM(A, algebraType) check.infinityM(B, algebraType) result = matrix(-Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) i = 1 repeat { if (i > nrow(A)) break j = 1 repeat { if (j > ncol(A)) break result[i, j] = max(A[i, j], B[i, j]) j = j + 1 } i = i + 1 } return(result) } else if (store == "coo") { counterA <- counter(A) counterB <- counter(B) COOA <- tropicalsparse.storage(A, "coo", algebraType) if (is.matrix(COOA)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_IndicesA_COO = COOA[[1]] col_IndicesA_COO = COOA[[2]] valuesA_COO = COOA[[3]] COOB = tropicalsparse.storage(B, "coo", algebraType) if (is.matrix(COOB)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_IndicesB_COO = COOB[[1]] col_IndicesB_COO = COOB[[2]] valuesB_COO = COOB[[3]] result = matrix(-Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) if (counterA > counterB) { max = counterA } else { max = counterB } x = 1 repeat { if (x > max) { break } if (x <= counterA) { i = row_IndicesA_COO[x] j = col_IndicesA_COO[x] y = 1 fnd = 0 while (y <= counterB) { if (i == row_IndicesB_COO[y] && j == col_IndicesB_COO[y]) { result[i, j] = max(valuesA_COO[x], valuesB_COO[y]) fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesA_COO[x] } } if (x <= counterB) { i = row_IndicesB_COO[x] j = col_IndicesB_COO[x] y = 1 fnd = 0 while (y <= counterA) { if (i == row_IndicesA_COO[y] && j == col_IndicesA_COO[y]) { fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesB_COO[x] } } x = x + 1 } return(result) } else if (store == "csr") { counterA <- counter(A) counterB <- counter(B) CSRA <- tropicalsparse.storage(A, "csr", algebraType) if (is.matrix(CSRA)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_PointerA_CSR = CSRA[[1]] col_IndicesA_CSR = CSRA[[2]] valuesA_CSR = CSRA[[3]] CSRB <- tropicalsparse.storage(B, "csr", algebraType) if (is.matrix(CSRB)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_PointerB_CSR = CSRB[[1]] col_IndicesB_CSR = CSRB[[2]] valuesB_CSR = CSRB[[3]] result = matrix(-Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) if (counterA > counterB) { max = counterA } else { max = counterB } x = 1 repeat { if (x > max) { break } if (x <= counterA) { i = row.col.Number(x, nrow(A), row_PointerA_CSR) j = col_IndicesA_CSR[x] y = 1 fnd = 0 while (y <= counterB) { if (i == row.col.Number(y, nrow(B), row_PointerB_CSR) && j == col_IndicesB_CSR[y]) { result[i, j] = max(valuesA_CSR[x], valuesB_CSR[y]) fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesA_CSR[x] } } if (x <= counterB) { i = row.col.Number(x, nrow(B), row_PointerB_CSR) j = col_IndicesB_CSR[x] y = 1 fnd = 0 while (y <= counterA) { if (i == row.col.Number(y, nrow(A), row_PointerA_CSR) && j == col_IndicesA_CSR[y]) { fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesB_CSR[x] } } x = x + 1 } return(result) } else if (store == "csc") { counterA <- counter(A) counterB <- counter(B) CSCA <- tropicalsparse.storage(A, "csc", algebraType) if (is.matrix(CSCA)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_PointerA_CSC = CSCA[[1]] row_IndicesA_CSC = CSCA[[2]] valuesA_CSC = CSCA[[3]] CSCB <- tropicalsparse.storage(B, "csc", algebraType) if (is.matrix(CSCB)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_PointerB_CSC = CSCB[[1]] row_IndicesB_CSC = CSCB[[2]] valuesB_CSC = CSCB[[3]] result = matrix(-Inf, nrow = nrow(A), ncol = ncol(A), byrow = TRUE) if (counterA > counterB) { max = counterA } else { max = counterB } x = 1 repeat { if (x > max) { break } if (x <= counterA) { i = row_IndicesA_CSC[x] j = row.col.Number(x, ncol(A), col_PointerA_CSC) y = 1 fnd = 0 while (y <= counterB) { if (i == row_IndicesB_CSC[y] && j == row.col.Number(y, ncol(B), col_PointerB_CSC)) { result[i, j] = max(valuesA_CSC[x], valuesB_CSC[y]) fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesA_CSC[x] } } if (x <= counterB) { i = row_IndicesB_CSC[x] j = row.col.Number(x, ncol(B), col_PointerB_CSC) y = 1 fnd = 0 while (y <= counterA) { if (i == row_IndicesA_CSC[y] && j == row.col.Number(y, ncol(A), col_PointerA_CSC)) { fnd = 1 break } y = y + 1 } if (fnd != 1) { result[i, j] = valuesB_CSC[x] } } x = x + 1 } return(result) } else { stop("Invalid Storage Format") } } else if (is.matrix(A) && is.vector(B) || is.matrix(B) && is.vector(A)) { if (is.matrix(B) && is.vector(A)) { temp = A A = B B = temp } if (is.null(store)) { check.infinityM(A, algebraType) check.infinityV(B, algebraType) if (length(B) == 1) { if (B != -Inf) { i = 1 while (i <= nrow(A)) { j = 1 while (j <= ncol(A)) { A[i, j] = max(A[i, j], B) j = j + 1 } i = i + 1 } } return(A) } else if (nrow(A) == length(B)) { i = 1 while (i <= ncol(A)) { j = 1 while (j <= length(B)) { if (A[j, i] != -Inf || B[j] != -Inf) { A[j, i] = max(A[j, i], B[j]) } j = j + 1 } i = i + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else if (store == "coo") { if (length(B) == 1) { if (B != -Inf) { result = matrix(B, nrow = nrow(A), ncol = ncol(A)) COO <- tropicalsparse.storage(A, "coo", algebraType) if (is.matrix(COO)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Indices_COO = COO[[1]] col_Indices_COO = COO[[2]] values_COO = COO[[3]] x = 1 while (x <= length(values_COO)) { i = row_Indices_COO[x] j = col_Indices_COO[x] result[i, j] = max(B, values_COO[x]) x = x + 1 } return(result) } return(A) } else if (nrow(A) == length(B)) { COO <- tropicalsparse.storage(A, "coo", algebraType) if (is.matrix(COO)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Indices_COO = COO[[1]] col_Indices_COO = COO[[2]] values_COO = COO[[3]] x1 = 1 x = 1 while (x <= nrow(A)) { y = 1 while (y <= ncol(A)) { i = row_Indices_COO[x1] j = col_Indices_COO[x1] if (!(is.na(i))) { if (i == x && j == y) { if (x1 <= length(values_COO)) { A[i, j] = max(B[x], values_COO[x1]) x1 = x1 + 1 } } else { A[x, y] = B[x] } } else { A[x, y] = B[x] } y = y + 1 } x = x + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else if (store == "csr") { if (length(B) == 1) { if (B != -Inf) { result = matrix(B, nrow = nrow(A), ncol = ncol(A)) CSR <- tropicalsparse.storage(A, "csr", algebraType) if (is.matrix(CSR)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Pointer_CSR = CSR[[1]] col_Indices_CSR = CSR[[2]] values_CSR = CSR[[3]] x = 1 while (x <= length(values_CSR)) { i = row.col.Number(x, nrow(A), row_Pointer_CSR) j = col_Indices_CSR[x] result[i, j] = max(B, values_CSR[x]) x = x + 1 } return(result) } return(A) } else if (nrow(A) == length(B)) { CSR <- tropicalsparse.storage(A, "csr", algebraType) if (is.matrix(CSR)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } row_Pointer_CSR = CSR[[1]] col_Indices_CSR = CSR[[2]] values_CSR = CSR[[3]] x1 = 1 x = 1 while (x <= nrow(A)) { y = 1 while (y <= ncol(A)) { i = row.col.Number(x1, nrow(A), row_Pointer_CSR) j = col_Indices_CSR[x1] if (!(is.na(i)) && !(is.na(j))) { if (i == x && j == y) { if (x1 <= length(values_CSR)) { A[i, j] = max(B[x], values_CSR[x1]) x1 = x1 + 1 } } else { A[x, y] = B[x] } } else { A[x, y] = B[x] } y = y + 1 } x = x + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else if (store == "csc") { if (length(B) == 1) { if (B != -Inf) { result = matrix(B, nrow = nrow(A), ncol = ncol(A)) CSC <- tropicalsparse.storage(A, "csc", algebraType) if (is.matrix(CSC)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_Pointer_CSC = CSC[[1]] row_Indices_CSC = CSC[[2]] values_CSC = CSC[[3]] x = 1 while (x <= length(values_CSC)) { i = row_Indices_CSC[x] j = row.col.Number(x, ncol(A), col_Pointer_CSC) result[i, j] = max(B, values_CSC[x]) x = x + 1 } return(result) } return(A) } else if (nrow(A) == length(B)) { CSC <- tropicalsparse.storage(A, "csc", algebraType) if (is.matrix(CSC)) { return(tropicalsparse.add(A, B, NULL, algebraType)) } col_Pointer_CSC = CSC[[1]] row_Indices_CSC = CSC[[2]] values_CSC = CSC[[3]] x1 = 1 x = 1 while (x <= ncol(A)) { y = 1 while (y <= nrow(A)) { i = row_Indices_CSC[x1] j = row.col.Number(x1, ncol(A), col_Pointer_CSC) if (!(is.na(i)) && !(is.na(j))) { if (i == y && j == x) { if (x1 <= length(values_CSC)) { A[i, j] = max(B[y], values_CSC[x1]) x1 = x1 + 1 } } else { A[y, x] = B[y] } } else { A[y, x] = B[y] } y = y + 1 } x = x + 1 } return(A) } else { stop("longer object length is not a multiple of shorter object length") } } else { stop("Invalid storage format") } } else if (is.vector(A) && is.vector(B)) { check.infinityV(A, algebraType) check.infinityV(B, algebraType) if ((length(A) == 1 && length(B) > 1) || (length(B) == 1 && length(A) > 1)) { if (length(B) == 1 && length(A) > 1) { temp = A A = B B = temp } if (A != -Inf) { i = 1 repeat { if (i > length(B)) break B[i] = max(A, B[i]) i = i + 1 } } return(B) } else { if (length(A) == length(B)) { i = 1 repeat { if (i > length(B)) break if (A != -Inf || B != -Inf) { A[i] = max(A[i], B[i]) } i = i + 1 } return(A) } stop("non-conformable arguments") } } else { stop("Invalid Input") } } else { stop("Invalid algebra type") } } --- function search by body --- Function tropicalsparse.add in namespace tropicalSparse has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/tropicalSparse.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 2:24.10, 41.41 + 5.31