Learn R Programming

freesurferformats (version 1.1.0)

cifti.validate.file.extension: 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)

Value

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

Arguments

filepath

character string, the file name to write.

file_type

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