diff --git a/R/ellipseParam.R b/R/ellipseParam.R index 82a78c1..3329bdf 100644 --- a/R/ellipseParam.R +++ b/R/ellipseParam.R @@ -42,7 +42,7 @@ ellipseParam <- function(data, k = 2, pcx = 1, pcy = 2) { if (pcx == 0 || pcy == 0) { stop("pcx and pcy must be non-zero.") } - if (!is.numeric(k) || k < 2 || k != floor(k)) { + if (k < 2) { stop("k must be at least equal to 2.") } if (k > ncol(data)) { diff --git a/tests/testthat/testthat-problems.rds b/tests/testthat/testthat-problems.rds new file mode 100644 index 0000000..c0dac1a Binary files /dev/null and b/tests/testthat/testthat-problems.rds differ