# Figure 1: network
require(MBNMAdose)
net.plot <- function(data=antidep){
# Create an mbnma.network object from the data
data2 <- with(data, data.frame(studyID=studyid,
agent=drug,
dose=round(dose),
r=r,
N=n)
)
network <- mbnma.network(data2)
# Generate a network plot from the data
plot(network,
level="agent",
remove.loops=TRUE,
label.distance=2.75)
}
# Appendix Figure 1: splitted network
require(MBNMAdose)
split.net.plot <- function(data=antidep){
# Create an mbnma.network object from the data
data2= with(data, data.frame(studyID=studyid,
agent=drug,
dose=round(dose),
r=r,
N=n)
)
network <- mbnma.network(data2)
# Generate a network plot from the data
plot(network,
v.color="agent",
layout=igraph::as_star(),
label.distance=4,
legend.x = 'right')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.