summaryrefslogtreecommitdiff
path: root/tests/testthat/test-get_order.R
blob: 0abb018bb6c64ec09979d0f5b8b0c00ed38ddcad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
})