Skip to content

Update cluster_logfc.R and wmw_gsea.R for compatibility with R>=4.0.0#4

Open
svigneau wants to merge 2 commits intoarc85:masterfrom
svigneau:master
Open

Update cluster_logfc.R and wmw_gsea.R for compatibility with R>=4.0.0#4
svigneau wants to merge 2 commits intoarc85:masterfrom
svigneau:master

Conversation

@svigneau
Copy link

Updated cluster_logfc.R and wmw_gsea.R for compatibility with R >4.0.0. Since R 4.0.0, matrices have two classes, "matrix" and "array", which leads to a "condition has length > 1" error when running, e.g., if (!class(expr.mat)=="dgCMatrix"). The "inherits" or "is" functions should be used instead of "==" for checking the class (https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html).
@svigneau

Updated for compatibility with R >4.0.0. Since R 4.0.0, matrices have two classes, "matrix" and "array", which leads to a "condition has length > 1" error when running `if (!class(expr.mat)=="dgCMatrix")`. The "inherits" or "is" functions should be used instead of "==" for checking the class (https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html).
Updated for compatibility with R >4.0.0. Since R 4.0.0, matrices have two classes, "matrix" and "array", which leads to a "condition has length > 1" error when running `if (!class(expr.mat)=="matrix")`. The "inherits" or "is" functions should be used instead of "==" for checking the class (https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant