plotMyMultipartiteMatrix: Plot the matrices corresponding to a Multipartite Network

Description Usage Arguments Details Value Examples

View source: R/plotMyMultipartiteMatrix.R

Description

Plot the matrices corresponding to a Multipartite Network

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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))

sbm documentation built on June 10, 2021, 1:07 a.m.