Skip to contents

Get the loadings matrix (spatial components)

Usage

loadings(x, ...)

# S4 method for class 'LatentNeuroVec'
loadings(x)

Arguments

x

An object, likely a LatentNeuroVec or similar

...

Additional arguments

Value

The loadings matrix (typically voxels x components)

Examples

if (FALSE) { # \dontrun{
# For LatentNeuroVec:
if (!is.null(fmristore:::create_minimal_LatentNeuroVec)) {
  lnv <- NULL
  tryCatch({
    # Helper creates a mask, n_mask_voxels determined internally or by arg
    lnv <- fmristore:::create_minimal_LatentNeuroVec(
      space_dims = c(4L, 4L, 2L),
      n_time = 10L,
      n_comp = 3L
    )
    l_matrix <- loadings(lnv)
    # Dimensions should be n_voxels_in_mask x n_comp
    print(dim(l_matrix))
  }, error = function(e) {
    message("loadings example for LatentNeuroVec failed: ", e$message)
  })
} else {
  message("Skipping loadings example for LatentNeuroVec: helper not available.")
}
} # }