We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8423163 commit 4d797dbCopy full SHA for 4d797db
R/create.autoencoder.R
@@ -8,8 +8,8 @@ create.autoencoder <- function(
8
) {
9
10
# 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');
+ if (!("matrix" %in% class(data.matrix) || "data.frame" %in% class(data.matrix))) {
+ stop('data.matrix needs to be a matrix or a data frame')
13
}
14
if (any(is.na(data.matrix))) {
15
stop('data matrix contains NA(s)');
0 commit comments