r - UseMethod 中的 Plotly/orca 错误(“plotly_build”)
问题描述
我正在尝试使用保存在 R(studio) 中使用名为 admixtools 的程序制作的图表。我能够绘制图表 ( plotly_graph(newgraph)
),但我无法保存它(svg/pdf/png 等)。我可以手动从 Rstudio 中保存绘图,但我有太多的事情要做。当我尝试保存图表时orca(newgraph, "newgraph.svg")
,出现错误:
UseMethod(“plotly_build”)中的错误:没有适用于“plotly_build”的方法应用于“igraph”类的对象
有任何想法吗?!?非常感谢!
devtools::install_github("uqrmaie1/admixtools")
install.packages("plotly")
library("admixtools")
library("orca")
library("plotly")
mypops = c('pop1', 'pop2', 'pop3')
pops = mypops
newgraph = random_admixturegraph(pops, numadmix = 0, outpop = 'pop1')
plotly_graph(newgraph)
# THE ABOVE WORKS FINE SO THERE IS NO PROBLEM WITH THE ADMIXTOOLS PART TO MAKE THE GRAPH
# INSTALLED ORCA AS DESCRIBED HERE: https://github.com/plotly/orca#installation (Mac OS) and added to my path fine
# The following results in the error:
# Error in UseMethod("plotly_build") : no applicable method for 'plotly_build' applied to an object of class "igraph
orca(newgraph, "newgraph.svg")
解决方案
推荐阅读
- r - 无法在 R 中安装任何软件包
- javascript - 任何模块都支持 npx,如 argv 解析器?
- android-studio - 如何捕获intellij插件卸载事件
- bash - 在 .csv 文件中选择列名
- google-apps-script - 从 Google Visualization API 查询中获取行号到 Google Sheet
- r - dplyr select 声称我有额外的参数不存在
- android - 如何消除“Rooms Repository”object.getInstance(app)的危险?
- swift - 添加到场景时,Swift SpriteKit SKEmitter 节点颜色不正确
- google-cloud-shell - 带有 ?authuser=1 参数的谷歌云外壳不断加载
- list - 给定位置可以采用的元素,生成所有可能列表的列表的函数