tests/testthat/test_sizeof_hdr.R

context("sizeof_hdr attribute")

suppressWarnings({
  aim <- readANALYZE(system.file("anlz/avg152T1.hdr.gz", 
                                 package = "oro.nifti"))
})
nim <- readNIfTI(system.file("nifti/mniRL.nii.gz", package = "oro.nifti"))

test_that("sizeof_hdr()", {
  expect_equal(sizeof_hdr(aim), 348)
  expect_equal(sizeof_hdr(nim), 348)
})

test_that("sizeof.hdr()", {
  expect_equal(sizeof.hdr(aim), 348)
  expect_equal(sizeof.hdr(nim), 348)
})


test_that("sizeof_hdr()", {
  expect_silent({
    sizeof_hdr(aim) = 348
    })
  expect_silent({
    sizeof_hdr(nim) = 348
  })
})

Try the oro.nifti package in your browser

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

oro.nifti documentation built on Aug. 10, 2022, 5:09 p.m.