Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R yaml.load()中出错:参数;错误。标签“;缺少,没有默认值_R_Yaml_Networkd3 - Fatal编程技术网

R yaml.load()中出错:参数;错误。标签“;缺少,没有默认值

R yaml.load()中出错:参数;错误。标签“;缺少,没有默认值,r,yaml,networkd3,R,Yaml,Networkd3,我目前正在尝试在R上运行MAPPER算法,并在以下网站上找到一些基本示例: 我使用的代码如下所示: library(TDAmapper) library(networkD3) First.Example.data = data.frame( x=2*cos(0.5*(1:100)), y=sin(1:100) ) First.Example.dist = dist(First.Example.data) First.Example.mapper <- mapper(dist_obj

我目前正在尝试在R上运行MAPPER算法,并在以下网站上找到一些基本示例:

我使用的代码如下所示:

library(TDAmapper)
library(networkD3)

First.Example.data = data.frame( x=2*cos(0.5*(1:100)), y=sin(1:100) )

First.Example.dist = dist(First.Example.data)

First.Example.mapper <- mapper(dist_object = First.Example.dist,
           filter_values = First.Example.data$x,
           num_intervals = 6,
           percent_overlap = 50,
           num_bins_when_clustering = 10)

MapperNodes <- mapperVertices(First.Example.mapper, 1:100 )
MapperLinks <- mapperEdges(First.Example.mapper)

forceNetwork(Nodes = MapperNodes, Links = MapperLinks, 
            Source = "Linksource", Target = "Linktarget",
            Value = "Linkvalue", NodeID = "Nodename",
            Group = "Nodegroup", opacity = 1, 
            linkDistance = 10, charge = -400)  
有人能告诉我如何解决这个问题吗


我已经试着重新安装了R、TDAMapper和networkD3,似乎所有的东西都安装得很好。然而,我在安装networkD3时确实收到了这条消息,这可能/可能对诊断问题没有帮助

正在尝试URL“”

下载文件(url、destfile、方法、mode=“wb”、…)中出错:
无法打开URL ''

此外:警告信息: 在download.file(url、destfile、method、mode=“wb”,…)中:
InternetOpenUrl失败:“操作已超时。” 出局

下载包中的警告(pkgs,destdir=tmpd,可用= 可用,:下载包“BH”失败,尝试URL ''

下载的内容类型“application/zip”长度为17919字节(17 KB) 17 KB


mapper
mapervertices
mapperEdges
功能目前仅在
TDAmapper
的开发版本中可用。您可以使用(
devtools
软件包必须安装)

在那之后,你的例子应该会起作用

否决票可能是因为你的“可复制的”例子不是“可复制的”,但这只是一个猜测,因为它不是我的


forceNetwork
{“x”0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2 3 3 3 3 3 3 3 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3“、32、7、95、70、20、45、71、8、96、33、58、83、69、6、94、31、56、81、19、44、17、18、80、43、55、68、30、5、93”,“V2:54,4,55,17,21,46,96,58,59”,“V3:29,92,80,67,42,71,8,33,34,84”,“V4:79,54,4,29,16,41,47,22,66,66,3,91,72,9,97,34,59,84”,“V5:85,60,35,73,10,98,15,40,41,22,66,3,91,28,53,78”,“V6:86,11,10,73,48,15,65,2,27”,“V7:61,36,99,90,78,77,77”V8:25,50,75,61,36,11,99,24,49,74,12,100,37,62,87,27,52,77,76,51,26,1,89,64,14,39,88,63,13,38“],“组”:[1,2,2,2,3,4,5,5,6],“选项”:{“节点ID”:“节点名称”,“组”:“节点组”,“色阶”:“d3 scaleOrdinal(d3.schemeCategory20);“,“fontSize”:7,“fontFamily”:“serif”,“ClickSize”:“ClickSize”:17.5”,“链接距离”:“链接宽度”:函数(d){return Math.sqrt(d.value);},“charge”:-400,“opacity”:1,“zoom”:false,“legend”:false,“arrows”:false,“nodesize”:false,“radiusCalculation”:“Math.sqrt(d.nodesize)+6”,“bounded”:false,“opacityNoHover”:0,“clickAction”:null},“evals”:[],“jsHooks”:[]}
{“查看器”:{“宽度”:450,“高度”:350,“填充”:10,“填充”:true},“浏览器”:{“宽度”:960,“高度”:500,“填充”:10,“填充”:true}

对于否决此问题的人,如果这是一个非常愚蠢的问题,我很抱歉,但我是一个业余爱好者,还没有真正了解如何使用R。如果答案显而易见,或者如果有更好的论坛发布此问题,一定要让我知道。您好,谢谢您的回复!我已经重新安装了R、TDAmapper和networkD3,但仍然没有安装work.TDAmapper似乎与其他示例配合得很好,但当我尝试使用networkD3时,forceNetwork和simpleNetwork函数不断给出关于缺少的error.label的相同错误。我猜想这意味着在安装软件包时出现了一些错误。我已在上面的原始问题的错误消息中进行了编辑-这是否正确I don’我不会给你任何关于哪里出了问题以及我能做些什么来解决这个问题的线索。首先,我会删除
库(ggplot2)
安装包('yaml')
示例中的行…它们是不必要的,可能会混淆问题。错误是因为尝试安装
BH
包,这可能是某个依赖项的依赖项,它是
htmlwidgets
的依赖项,它是
networkD3
的依赖项。这可能只是网络故障,所以我会尝试一下或者尝试从不同的repo/mirror安装,比如
install.packages(“networkD3”,repos=”https://cran.rstudio.com/")
并确保您使用的是
yaml
v2.1.18…此问题似乎已在该更新中得到解决,您好-谢谢!我从另一家回购公司重新安装了networkD3,现在一切正常!谢天谢地。
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  argument "error.label" is missing, with no default
devtools::install_github("paultpearson/TDAmapper")