Description Usage Arguments Value Examples
View source: R/NiftiArrayList.R
Reads multiple NiftiArray objects into elements of a list. TODO: Add more detail based on BUG fix.
1 | NiftiArrayList(x, ..., verbose = FALSE)
|
x |
a character or list of objects to be called with writeNiftiArray |
... |
additional arguments to pass to NiftiArray |
verbose |
show progress bars if |
A list of class NiftiArrayList
, which is a
list if NiftiArray
objects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | nii_fname = system.file("extdata",
"example.nii.gz", package = "RNifti")
nii_fname = rep(nii_fname, 3)
res = NiftiArrayList(nii_fname)
if (requireNamespace("pbapply", quietly = TRUE)) {
res = NiftiArrayList(nii_fname, verbose = TRUE)
} else {
testthat::expect_warning({
res = NiftiArrayList(nii_fname, verbose = TRUE)
})
}
testthat::expect_is(res, "NiftiArrayList")
mat = as(res, "NiftiMatrix")
arr = as(res, "NiftiArray")
h5 = unlist(DelayedArray::seedApply(res, slot, "filepath"))
res2 = NiftiArrayList(h5)
testthat::expect_is(res2, "NiftiArrayList")
mat = as(res2, "NiftiMatrix")
arr = as(res2, "NiftiArray")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.