R/is_cifti_numeric.R

Defines functions is_cifti_numeric

Documented in is_cifti_numeric

#' @title Test of numeric CIFTI field
#' @description Wrapper of CIFTI fields for easy logical test
#' @param x character vector of names
#'
#' @return Logical of length same as x
#' @export
is_cifti_numeric = function(x) {
  num_attrs = c('NumberOfMatrices',
                'AppliesToMatrixDimension',
                'IndexOffset', 'IndexCount',
                'SurfaceNumberOfNodes', 'VolumeDimensions',
                'SurfaceNumberOfVertices', 'SeriesStart',
                'SeriesStep', 'NumberOfSeriesPoints',
                'SeriesExponent', 'Vertices', 'MeterExponent')
  x %in% num_attrs
}
muschellij2/cifti documentation built on May 25, 2018, 6:29 p.m.