I have been using bipartiteD3-package in latest version of R and R studio. Since a few weeks, the interactive bipartite graphs are not appearing. Instead, an error message is appearing in the console mentioning that it was not possible to open the URL ‘http://vizjs.org/viz.v1.1.0.min.js’.
After reading some recommendations, I downloaded the file viz.js to the R working directory, but now I have this new message:
Error: viz is not defined in (bipartiteD3Script.js#25:34)
ReferenceError: viz is not defined
and no graph appears.
I am currently testing the package example:
library(r2d3)
library(bipartite )
library(purrr)
library(dplyr)
library(tidyr)
library(stringr)
library(tibble)
library(RColorBrewer)
library(bipartiteD3)
testdata <- data.frame(higher = c(“bee1″,”bee1″,”bee1″,”bee2″,”bee1″,”bee3”),
lower = c(“plant1″,”plant2″,”plant1″,”plant2″,”plant3″,”plant4”),
webID = c(“meadow”,”meadow”,”meadow”,”meadow”,”meadow”,”meadow”), freq=c(5,9,1,2,3,7))
bipartite::frame2webs(testdata)-> SmallTestWeb
SmallTestWeb
bipartite::plotweb(SmallTestWeb$meadow)
bipartite_D3(SmallTestWeb)
Thanks in advance if someone can help me!
1