I'm trying to generate a graph with the VisNetwork package of R. But I got the error
Error in normalizePath(target_dir, "/", TRUE) :
path[1]="query/htmlwidgets-1.2": No such file or directory
The code I've written is :
visNetwork(nodes = nodes, edges = edges, width = "100%", height = 900,
main = list(
style = 'font:caption;font-weight:bold;font-size:15px;text-align:center;')) %>%
visPhysics(solver = "forceAtlas2Based",
stabilization = T,
timestep=0.25,
forceAtlas2Based = list(gravitationalConstant = -50, avoidOverlap = 0.95)) %>%
visOptions(highlightNearest = TRUE) %>%
visEdges(smooth = T) %>%
visNodes(scaling = list(min = 10, max = 40))%>%
visSave(file = save_name, background = "white",selfcontained = T)
}
The error appears when I set save_name to any directory different from './' . But what is more Surprising is that I can't find the generated file anywhere.
Can anyone help me to solve this so I can set the path I want ?
Thanks