Description Usage Arguments Details Value See Also Examples
Allocate a neighbourhood matrix to a MRIaggr object.
1 2 3 | ## S4 replacement method for signature 'MRIaggr'
allocW(object, type,
overwrite = FALSE, verbose = optionsMRIaggr("verbose")) <- value
|
object |
an object of class |
value |
a list containing the neighbourhood matrix and associated elements. list. See the details section. REQUIRED. |
type |
the type of element to be allocated. Can be |
overwrite |
if an element with the same name is already stored in |
verbose |
should the execution of the function be traced ? logical. |
ARGUMENTS:
Argument value must be a list containing named elements :
Element "Wmatrix" must be matrix or a sparse matrix.
Element "Wblocks" must be consistent with the output of the calcBlockW method.
Element "verbose" must be logical or NULL method.
FUNCTION:
This method enable to store a neighbourhood matrix (type="Wmatrix"), a block decomposition of the matrix (type="Wblocks") and its format (type="upper") : entire matrix (NULL), upper-triagonal (TRUE) or lower-triagonal (FALSE).
None.
calcW to compute the neighboring matrix.
calcBlockW to decompose the neighboring matrix in independant blocks.
selectW to extract the neighboring matrix or its related elements.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
## search for a neighbourhood matrix
# selectW(MRIaggr.Pat1_red) # no neighbourhood matrix
## compute the neighbourhood matrix
resW <- calcW(object = MRIaggr.Pat1_red, range = sqrt(2))
## store it
allocW(MRIaggr.Pat1_red, type = "Wmatrix") <- list(Wmatrix = resW$W)
## it is automatically performed when specifying update.object = TRUE
calcW(object = MRIaggr.Pat1_red, range = sqrt(2), update.object = TRUE, overwrite = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.