Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

check_mask

Check Mask is Binary


Description

Determine if only values in a mask are 0/1

Usage

check_mask(mask, allow.NA = FALSE, allow.array = TRUE)

Arguments

mask

Object of class nifti

allow.NA

allow NAs in the mask

allow.array

if class(mask) is "array", is this OK?

Value

Logical indicating if object is binary mask with only 0, 1, and NA if applicable

Examples

arr = array(rbinom(1000, size = 1, prob = 0.2), dim = c(10,10,10))
nim = oro.nifti::nifti(arr)
check_mask(nim)

neurobase

'Neuroconductor' Base Package with Helper Functions for 'nifti' Objects

v1.32.1
GPL-2
Authors
John Muschelli [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.