plotMyMultipartiteMatrix: Plot the matrices corresponding to a Multipartite Network

Description Usage Arguments Details Value Examples

View source: R/plotMyMultiplexeMatrix.R View source: R/plotMyMultipartiteMatrix.R

Description

Plot the matrices corresponding to a Multipartite Network

Plot the matrices corresponding to a Multiplex Network

Usage

1
2
3
plotMyMultipartiteMatrix(listSBM, memberships = NULL, plotOptions = list())

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

plotOptions is a list containing the following items

Value

a ggplot object corresponding to the plot

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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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))



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))

GrossSBM/sbm documentation built on April 8, 2021, 5:53 a.m.