Skip to content

Commit

Permalink
fix matrix check issue
Browse files Browse the repository at this point in the history
  • Loading branch information
maotian06 committed Aug 23, 2024
1 parent 8423163 commit 4d797db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/create.autoencoder.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ create.autoencoder <- function(
) {

# input checks
if ('matrix' != class(data.matrix) && 'data.frame' != class(data.matrix)) {
stop('data.matrix needs to be a matrix or a data frame');
if (!("matrix" %in% class(data.matrix) || "data.frame" %in% class(data.matrix))) {

Check warning on line 11 in R/create.autoencoder.R

View workflow job for this annotation

GitHub Actions / CICD-base

Only use single-quotes.

Check warning on line 11 in R/create.autoencoder.R

View workflow job for this annotation

GitHub Actions / CICD-base

Only use single-quotes.

Check warning on line 11 in R/create.autoencoder.R

View workflow job for this annotation

GitHub Actions / CICD-base

Only use single-quotes.

Check warning on line 11 in R/create.autoencoder.R

View workflow job for this annotation

GitHub Actions / CICD-base

Only use single-quotes.
stop('data.matrix needs to be a matrix or a data frame')
}
if (any(is.na(data.matrix))) {
stop('data matrix contains NA(s)');
Expand Down

0 comments on commit 4d797db

Please sign in to comment.