Description Usage Arguments Details See Also Examples
Extract elements in the W
slot of a MRIaggr
object.
1 2 3 |
object |
an |
type |
the type of the element to select. Can be |
subset_W |
the subset of observations to select. integer vector or |
hemisphere |
the hemisphere to use. character. |
num |
the slices to use. numeric vector or |
slice_var |
the type of slice to extract. |
upper |
the format of the matrix to extract. Can be the full matrix ( |
This function requires to have installed the Matrix and the spam package to work when argument name
is set to "W_euclidean"
.
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:
If subset_W
is not NULL
then arguments hemisphere
and num
are ignored.
Each of the num
, hemisphere
and subset
argument define a subset of the total set of observations.
It is the intersection of all these three subsets is extracted.
calcW
to compute the neighboring matrix.
calcBlockW
to decompose the neighboring matrix in independant blocks.
1 2 3 4 5 6 7 8 9 10 | ## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
## compute and allocate a neighbourhood matrix
calcW(object=MRIaggr.Pat1_red, range = sqrt(2), update.object = TRUE)
## select the neighbourhood matrix
selectW(MRIaggr.Pat1_red)[1:10,1:10]
selectW(MRIaggr.Pat1_red, upper = TRUE)[1:10,1:10]
# selectW(MRIaggr.Pat1_red, upper = FALSE)[1:10,1:10] # will not work
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.