You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replacing the test with !inherits(X, c("ExpressionSet", "matrix")) fixes the issue
estParam2 <- function (X, type = 1)
{
# if (!class(X) %in% c("ExpressionSet", "matrix"))
# stop("input X should be either an ExpressionSet or a matrix")
if (!inherits(X, c("ExpressionSet", "matrix")))
stop("input X should be either an ExpressionSet or a matrix")
if (!is.matrix(X))
X = exprs(X)
if (!(type == 1 | type == 2))
stop("type must be either 1 or 2")
if (type == 1) {
res = PROPER:::getDisp1(X)
}
if (type == 2) {
require(edgeR)
res = PROPER:::getDisp2(X)
}
res
}
Can submit a pull request if needed.
The text was updated successfully, but these errors were encountered:
PROPER_1.30.0
R version 4.2.1
Running
estParam()
with a matrix in R > 4 will throw an error due to matrix objects now inheriting from both "matrix" and "array" classes, which breaks code assumingclass(matrix_obj))
has length one.See
https://stackoverflow.com/questions/64660948/issue-with-creating-a-matrix-in-r
https://cran.r-project.org/doc/manuals/r-release/NEWS.html for R 4.0.0 release
Replacing the test with
!inherits(X, c("ExpressionSet", "matrix"))
fixes the issueCan submit a pull request if needed.
The text was updated successfully, but these errors were encountered: