Learn R Programming

neurobase (version 1.32.4)

file_imgext: Get Image file extension

Description

Get the image file extension, either .nii, .hdr, .nii.gz, or .hdr.gz

Usage

file_imgext(file, withdot = TRUE)

Value

Vector of extensions. If withdot = FALSE, then will return nii instead of .nii

Arguments

file

Vector of character filenames

withdot

Should the extension begin with "."?