tests/testthat/tests_contingency.R

cat("tests_contingency.R:\n")

testthat::test_that("struc() output", { 
  locinfile <- genepopExample('structest.txt')
  outfile <- struc(locinfile) 
  testthat::expect_equal(readLines(outfile)[34],
                         "P value=0.598782   S.E=0.006606 (243439 switches)")
})

Try the genepop package in your browser

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

genepop documentation built on Jan. 22, 2023, 1:07 a.m.