Learn R Programming

freesurferformats (version 1.1.0)

is.analyze.file: Check whether a file is an ANALYZE 7.5 file.

Description

Check whether a file is an ANALYZE 7.5 file.

Usage

is.analyze.file(filepath)

Value

logical, whether the 348 byte header is an ANALYZE 7.5 header. This is the case when the header contains neither of the two NIFTI v1 magic strings, i.e. when the magic is empty. Files that use the ni1 magic are NIFTI v1 pair files, see read.nifti1.header, and files with the n+1 magic are single file NIFTI v1 files.

Arguments

filepath

character string, the path to a .hdr file (or to a file whose name ends with the base name of one, see analyze.pair.files).

Examples

Run this code
hdrfile <- system.file("extdata", "analyze", "tiny_u8.hdr",
  package = "freesurferformats", mustWork = TRUE
)
is.analyze.file(hdrfile)

Run the code above in your browser using DataLab