diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/testthat/test-get_order.R | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/testthat/test-get_order.R b/tests/testthat/test-get_order.R new file mode 100644 index 0000000..0abb018 --- /dev/null +++ b/tests/testthat/test-get_order.R @@ -0,0 +1,15 @@ +test_that("get_order returns a character vector", { + p <- 10 + X <- matrix(rnorm(100), ncol = p) + R <- cor(X) + R_order <- get_order(R) + is.character(R_order) +}) + +test_that("get_order returns a character vector the same length as p and n", { + p <- 10 + X <- matrix(rnorm(100), ncol = p) + R <- cor(X) + R_order <- get_order(R) + length(R_order) == p +}) |
