# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab