diff options
| author | Chris Sobczak <chris@sobczak.family> | 2026-07-06 15:13:21 -0700 |
|---|---|---|
| committer | Chris Sobczak <chris@sobczak.family> | 2026-07-06 15:13:21 -0700 |
| commit | ea489f0b5cb7919dfc32d4e33def5af46807b504 (patch) | |
| tree | 9e1ea31dbd880de9b28785274f6827c003788623 /tests/testthat | |
| parent | e6f6a49b41a26b184cbdc7b3f532f3deef01031d (diff) | |
Add ordering function
Diffstat (limited to 'tests/testthat')
| -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 +}) |
