Description Usage Arguments Value Author(s) Examples
Write Dataframe or Matrix to NII file
1 2 3 4 5 6 7 8 9 10 |
in.table |
dataframe or matrix object to output to NII file |
coords |
voxel coordinates of location in NII file to write values |
save.dir |
directory location to save output |
prefix |
prefix to be the base of filenames, default is the name of the input table object |
do.log |
logical, whether or not to write log file providing details about what the output contents are. this may be helpful for sorting through volumes. |
model.string |
A string to wirte to the log file specifying describing or specifying the model that was run |
ref.nii |
a reference NII image to draw image properties from (e.g., dimensions and orientation) |
img.dims |
voxel dimensions of target NII file |
pixdim |
voxel dimensions of NII output |
orient |
orientation list object of NII output |
Output directly to log.text file and write to specified coordinates in a set of NII files.
Timothy R. Koscik <timothy-koscik@uiowa.edu>
1 2 3 4 5 6 7 8 9 10 11 | # get filename for example NII file included in nifti.io package
ref.nii <- system.file("extdata", "egBrain.nii", package="nifti.io")
mdl <- lm(mpg ~ cyl, mtcars)
mdl.coef <- as.data.frame(summary(mdl)$coef)
table.to.nii(in.table=mdl.coef,
coords=c(20,35,20),
save.dir=tempdir(),
prefix="exampleModel_coef",
model.string="lm(mpg ~ cyl, mtcars)",
ref.nii=ref.nii)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.