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))
Run the code above in your browser using DataLab