1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-11 05:41:53 +02:00

(v1.4.0.9001) is_gram_positive(), is_gram_negative(), parameter hardening

This commit is contained in:
2020-10-19 17:09:19 +02:00
parent 833a1be36d
commit 4e9ccb4435
76 changed files with 969 additions and 491 deletions

View File

@ -66,9 +66,12 @@ pca <- function(x,
scale. = TRUE,
tol = NULL,
rank. = NULL) {
stop_ifnot(is.data.frame(x), "`x` must be a data.frame")
stop_if(any(dim(x) == 0), "`x` must contain rows and columns")
meet_criteria(x, allow_class = "data.frame")
meet_criteria(retx, allow_class = "logical", has_length = 1)
meet_criteria(center, allow_class = "logical", has_length = 1)
meet_criteria(scale., allow_class = "logical", has_length = 1)
meet_criteria(tol, allow_class = "numeric", has_length = 1, allow_NULL = TRUE)
meet_criteria(rank., allow_class = "numeric", has_length = 1, allow_NULL = TRUE)
# unset data.table, tibble, etc.
# also removes groups made by dplyr::group_by