MRIaggr-selectN: Extract the number of observations

Description Usage Arguments Details Value Examples

Description

Extract the number of observations contained in a Carto3D or in a MRIaggr object.

Usage

1
2
3
4
5
## S4 method for signature 'Carto3D'
selectN(object, num = NULL)
		 
## S4 method for signature 'MRIaggr'
selectN(object, num = NULL, hemisphere = "both", subset = NULL)

Arguments

object

an object of class MRIaggr. REQUIRED.

num

the slices to consider. numeric vector or NULL.

hemisphere

the hemisphere to consider. character.

subset

the subset of observations to consider. positive integer vector or NULL leading to consider all observations.

Details

ARGUMENTS:
Information about the num argument can be found in the details section of initNum.

Information about the hemisphere argument can be found in the details section of selectContrast.

FUNCTION:
Each of the num, hemisphere and subset argument define a subset of the total set of observations. It is the length of the intersection of all these three subsets that is measured.

Value

An integer.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")

## total number of observations
res <- selectN(MRIaggr.Pat1_red)

## number of observations for the hemisphere that contains the lesion
res <- selectN(MRIaggr.Pat1_red, hemisphere = "lesion")

## number of observations in the first 1000 observations t
## that are in the hemisphere containing the lesion
res <- selectN(MRIaggr.Pat1_red, subset = 1:1000, hemisphere = "lesion")

bozenne/MRIaggr documentation built on May 13, 2019, 1:39 a.m.