R/Visualisation.R

Defines functions plot_adjacency

Documented in plot_adjacency

#' Plot adjacency matrices
#' 
#' A function to plot each adjacency matrices defined by the thrid dimension of an array, and plot the sum of all theses matrices.
#' 
#' @param A an array with dim=c(N,N,V).
#'
#' @return None
#' @export
#' @importFrom graphics image
plot_adjacency<- function(A){
  #------------ Objectif ------------
  # Permet de visualiser les différentes matrices d'adjacences du tensor A

  #------------ Variable ------------
  # A : array(.,.,V)
  V <- dim(A)[3]

  #------------ Visualisation ------------
  for(v in 1:V){
    image(A[,,v],axes=FALSE)
  }
  image(apply(A,c(1,2),sum))
}

Try the mimiSBM package in your browser

Any scripts or data that you put into this service are public.

mimiSBM documentation built on May 29, 2024, 2:48 a.m.