plotMyMultipartiteMatrix {sbm}R Documentation

Plot the matrices corresponding to a Multipartite Network

Description

Plot the matrices corresponding to a Multipartite Network

Usage

plotMyMultipartiteMatrix(listSBM, memberships = NULL, plotOptions = list())

Arguments

listSBM

: a list of objects representing the multipartite network (see)

memberships

: a list of length equal to the number of Functional Groups providing the clusterings inside each group.

plotOptions

: a list containing the options. See details.

Details

plotOptions is a list containing the following items

Value

a ggplot object corresponding to the plot

Examples

data("multipartiteEcologicalNetwork")
Net <- multipartiteEcologicalNetwork
type='bipartite'
model = 'bernoulli'
directed = FALSE
listNet <- list()
listNet[[1]] = defineSBM(Net$Inc_plant_ant,
                         model,type,directed,
                         dimLabels = c(row = "Plants", col = "Ants"))
listNet[[2]] = defineSBM(Net$Inc_plant_bird,model,type,directed,
                      dimLabels =c(row = "Plants",col = "Birds"))
plotMyMultipartiteMatrix(listNet,plotOptions=list(legend = TRUE,title='Ecology'))

listNet <- list()
listNet[[1]] <- defineSBM(matrix(rbinom(1000,1,0.5),20,50),
                   model = 'bernoulli',
                   type  ='bipartite', directed = NA,
                   dimLabels = c(row="Questions",col="Students"))
listNet[[2]] <- defineSBM(matrix(rpois(20*30,8),30,20),
                   model = 'poisson',
                   type  ='bipartite',directed = NA,
                   dimLabels = c(row="Competences",col="Questions"))
plotMyMultipartiteMatrix(listNet,plotOptions=list(legend = TRUE,compact = FALSE))
plotMyMultipartiteMatrix(listNet,plotOptions=list(legend = TRUE,normalized =  TRUE))




[Package sbm version 0.4.6 Index]