mirror of
https://github.com/msberends/AMR.git
synced 2025-09-05 23:29:44 +02:00
(v1.2.0.9011) mo_domain(), improved error handling
This commit is contained in:
5
R/pca.R
5
R/pca.R
@@ -61,9 +61,8 @@ pca <- function(x,
|
||||
tol = NULL,
|
||||
rank. = NULL) {
|
||||
|
||||
if (!is.data.frame(x)) {
|
||||
stop("this function only takes a data.frame as input")
|
||||
}
|
||||
stop_ifnot(is.data.frame(x), "`x` must be a data.frame")
|
||||
stop_if(any(dim(x) == 0), "`x` must contain rows and columns")
|
||||
|
||||
# unset data.table, tibble, etc.
|
||||
# also removes groups made by dplyr::group_by
|
||||
|
Reference in New Issue
Block a user