tests/testthat/test_input.R

#checks input functions
context("check input functions")
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Test: compare input data imported in different ways
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_that("test_input", {
  G.small.fromgz <- grm.input("small.gcta.grm.gz")
  G.small.frombin <- grm.bin.input("small.gcta.grm.bin")
  expect_equal(G.small.fromgz, G.small)
  expect_equal(G.small.fromgz, G.small.frombin, tolerance = 1E-7)
})

Try the grmsem package in your browser

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

grmsem documentation built on Jan. 29, 2021, 5:07 p.m.