我有unaryizepath中的错误'在Visnetwork r

发布于 2025-02-13 08:19:21 字数 1010 浏览 1 评论 0原文

我正在尝试使用R的Visnetwork软件包生成图形。但是我发现了

Error in normalizePath(target_dir, "/", TRUE) :
  path[1]="query/htmlwidgets-1.2": No such file or directory 

我编写的代码的错误是:

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)
    }

当我将Save_name设置为与'./'./'./'./ >。 但是,更令人惊讶的是,我在任何地方都找不到生成的文件。

谁能帮助我解决这个问题,以便我可以设置想要的路?

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文