Learn R Programming

freesurferformats (version 1.1.0)

.format.gradient.values: Format numeric values for a gradient table text file.

Description

Writes gradient values with enough significant digits to survive a round trip, in a plain decimal or scientific notation that the FSL, MRtrix3, DIPY and NumPy readers all accept. Note that formatC(..., digits = 15) cannot be used here: with the default width = NULL it treats digits as the field width and pads every value with spaces, which makes the files hard to read.

Usage

.format.gradient.values(x)

Value

character vector of the same length as x.

Arguments

x

numeric vector, the values to format.