checkClass: Checks if object is of given class and stops if not.

Description Usage Arguments Value Examples

View source: R/brainImageClass.R

Description

An object obj is tests if its class equals expClass. If not, execution is halted.

Usage

1
checkClass(obj, expClass)

Arguments

obj

Object to test

expClass

character of the class

Value

TRUE if everything is ok. Otherwise, execution is halted.

Examples

1
2
3
4
data <- data.frame(x=1:10, y=1:10, 
z=c(rep(2,5), rep(3,5)), val=rnorm(100))
img <- new("brainImage", data, "test", 10)
checkClass(img, "brainImage")

mknoll/imageanalysisBrain documentation built on May 23, 2019, 2:01 a.m.