Skip to content

Commit 4d797db

Browse files
committed
fix matrix check issue
1 parent 8423163 commit 4d797db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/create.autoencoder.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ create.autoencoder <- function(
88
) {
99

1010
# input checks
11-
if ('matrix' != class(data.matrix) && 'data.frame' != class(data.matrix)) {
12-
stop('data.matrix needs to be a matrix or a data frame');
11+
if (!("matrix" %in% class(data.matrix) || "data.frame" %in% class(data.matrix))) {
12+
stop('data.matrix needs to be a matrix or a data frame')
1313
}
1414
if (any(is.na(data.matrix))) {
1515
stop('data matrix contains NA(s)');

0 commit comments

Comments
 (0)