Skip to content

Commit 293a27d

Browse files
committed
Bump Roxygen version
1 parent 1e505a1 commit 293a27d

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Suggests:
3737
lintr,
3838
Matrix
3939
VignetteBuilder: knitr
40-
RoxygenNote: 7.3.0
40+
RoxygenNote: 7.3.1
4141
Encoding: UTF-8
4242
Config/testthat/edition: 3
4343
SystemRequirements: C++17

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ importFrom(checkmate,assert_integer)
1515
importFrom(checkmate,assert_logical)
1616
importFrom(checkmate,assert_number)
1717
importFrom(checkmate,assert_numeric)
18-
importFrom(checkmate,assert_vector)
1918
importFrom(checkmate,check_matrix)
2019
importFrom(checkmate,check_numeric)
2120
importFrom(checkmate,test_atomic_vector)

R/diffusr-package.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,5 @@
5151
#' @useDynLib diffusr
5252
#'
5353
#' @importFrom Rcpp sourceCpp
54-
#' @importFrom checkmate assert_vector
55-
#' @importFrom sparseMatrixStats colAnyNAs
5654
NULL
5755

58-
.onAttach <- function(libname, pkgname) {
59-
assert_vector(colAnyNAs(matrix(0)))
60-
}

R/is.dgCMatrix.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ is.dgCMatrix <- function(mat) {
1818
#'
1919
#' @export
2020
#'
21+
#' @importFrom sparseMatrixStats colAnyNAs
22+
#'
2123
assert_dgCMatrix <- function(adj_matrix, non_negative = TRUE) {
2224
if (adj_matrix@Dim[1] != adj_matrix@Dim[2]) {
2325
stop(paste("Error: Assertion on 'adj_matrix' failed: Must have exactly",
@@ -29,5 +31,7 @@ assert_dgCMatrix <- function(adj_matrix, non_negative = TRUE) {
2931
} else if (non_negative && any(adj_matrix@x < 0)) {
3032
stop(paste("Error: Assertion on 'adj_matrix' failed: Element",
3133
seq_along(adj_matrix@x)[adj_matrix@x < 0][1], "is not >= 0."))
34+
} else if (colAnyNAs(adj_matrix)) {
35+
stop("Error: NAs in the matrix.")
3236
}
3337
}

0 commit comments

Comments
 (0)