tests/testthat/test-rearrange.R

test_that("Rearrange return correct order", {
  d <- datasets::iris[, 1:4]
  d[1, 1] <- NA
  d <- correlate(d)

  expect_equal(
    colnames(rearrange(d)),
    c("term", "Petal.Length", "Petal.Width", "Sepal.Length", "Sepal.Width")
  )
})

Try the corrr package in your browser

Any scripts or data that you put into this service are public.

corrr documentation built on Aug. 17, 2022, 1:05 a.m.