Learn R Programming

freesurferformats (version 1.1.0)

as.list.fs.tracts: Convert an fs.tracts instance to a plain list of tracts.

Description

Converts to the classic representation as a list with one entry per tract. This is convenient for interacting with code that expects a plain list, but note that it materializes one R object per tract and is therefore much more expensive in both memory and time. Prefer [[ for accessing individual tracts.

Usage

# S3 method for fs.tracts
as.list(x, ...)

Value

list with one entry per tract.

Arguments

x

an fs.tracts instance.

...

ignored.

Examples

Run this code
if (FALSE) {
tck <- read.dti.tck("brain.tck");
tracts_list <- as.list(tck$tracks);
}

Run the code above in your browser using DataLab