######## toy example
data(vfit)
test_dat <- vfit[1:10, c("sex", "ani.pro", "veg.pro", "B6",
"B12", "B9", "SPPB.total", "HandGrip" )]
out_test <- nutriNetwork(test_dat, method = "gibbs")
sel_test <- selectnet(out_test)
########
# \dontshow{
out_check <- nutriNetwork(vfit, method ="npn")
sel_check <- selectnet(out_check)
# }
# \donttest{
out <- nutriNetwork(vfit, method = "gibbs")
sel <- selectnet(out)
cl <- c(rep("gray70", 7), rep("green3",17), rep("red3",5))
plot(sel, vis= "parcor.network", sign.edg = TRUE,
vertex.color = cl, curve = TRUE, layout.tree= TRUE,
root.node= c(26, 29), pos.legend= "bottomleft",
cex.legend=1)
#diffeent visualization
plot(sel, vis= "parcor.network", sign.edg = TRUE, layout = NULL,
vertex.color = cl, curve = TRUE, pos.legend= "topleft",
cex.legend=1 )
# }
Run the code above in your browser using DataLab