Learn R Programming

gifti (version 0.8.0)

gifti_list: Convert GIFTI to List

Description

Reads in a GIFTI file and coerces it to a list

Usage

gifti_list(file)

Arguments

file

file name of GIFTI file

Value

List of elements

Examples

Run this code
# NOT RUN {
if (have_gifti_test_data(outdir = NULL)) {
   gii_files = download_gifti_data(outdir = NULL)
   L = gifti_list(gii_files[1])
   orig = L$DataArray$Data[[1]]
   encoding = attributes(L$DataArray)$Encoding
   datatype = attributes(L$DataArray)$DataType
   endian = attributes(L$DataArray)$Endian
   vals =  data_decoder(orig, encoding = encoding,
   datatype = datatype, endian = endian)
   enc = data_encoder(vals, encoding = encoding,
   datatype = datatype, endian = endian)
   enc == orig
}
# }

Run the code above in your browser using DataLab