## Not run:
# #### create the necessary files ###
#
# dir.create("fiach_example/")
# file<-system.file("extdata","motion_ex.nii.gz",package="FIACH")
# arr<-readNii(file)
# RNiftyReg::writeNifti(arr,"fiach_example/motion_ex.nii.gz",datatype = "short")
# data(rp)
# write.table(rp[1:13,],"fiach_example/rp.txt",col.names=FALSE,row.names=FALSE)
#
# # running FIACH #
# t<-boldContrast(1.5,30)
# tr<-2.16
# system.time(fiach("fiach_example/motion_ex.nii.gz", t=t,tr=tr, rp="fiach_example/rp.txt"))
#
# ## Note that this is a toy example.
# ## The results are meaningless.
# ## This is only an example of how
# ## one would use fiach in a script.
# ## End(Not run)
Run the code above in your browser using DataLab