tests/testthat/test-roxytest-testexamples-show_cor.R

# Generated by roxytest: do not edit by hand!

# File R/show_cor.R: @testexamples

test_that("Function show_cor() @ L48", {
  
  data("mtcars")
  p1 <- show_cor(mtcars)
  p2 <- show_cor(mtcars,
    x_vars = colnames(mtcars)[1:4],
    y_vars = colnames(mtcars)[5:8]
  )
  p3 <- show_cor(mtcars, vis_method = "circle", p_adj = "fdr")
  p1
  p1$cor
  p2
  p3
  
  ## Auto detect problem variables
  mtcars$xx <- 0L
  p4 <- show_cor(mtcars)
  p4
  expect_is(p1, "ggplot")
  expect_is(p2, "ggplot")
  expect_is(p3, "ggplot")
  expect_is(p4, "ggplot")
})
ShixiangWang/sigminer documentation built on March 16, 2024, 12:30 p.m.