cifti.validate.file.extension: Check the file extension against the axes of the data.

View source: R/write_cifti.R

cifti.validate.file.extensionR Documentation

Check the file extension against the axes of the data.

Description

A CIFTI-2 file name states the file type (.dscalar, .pdconn, ...), and the type decides which matrix index types the two dimensions have. A file whose name contradicts its content is silently misread by other software, so this is an error.

Usage

cifti.validate.file.extension(filepath, file_type)

Arguments

filepath

character string, the file name to write.

file_type

a one row data.frame, see cifti.file.type.for.axes.

Value

NULL, invisibly. Stops if the file name names a different file type.


freesurferformats documentation built on Sept. 25, 2026, 1:07 a.m.