I'm currently trying to run the MAPPER algorithm on R, and work through some basic examples found on the website here:
The code I'm using is as follows:
library(TDAmapper) library(ggplot2) library(networkD3) install.packages('yaml') 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)
However, when I run this code, I keep getting this error that I don't know how to fix:
Error in yaml.load(readLines(con), error.label = error.label, ...) : argument "error.label" is missing, with no default
Can someone tell me how to fix this issue please?
I've tried reinstalling R, TDAMapper and networkD3, and everything more or less seems to have installed fine. However, I did get this message during the installation of networkD3 which may/may not be helpful in diagnosing the problem.
Error in download.file(url, destfile, method, mode = "wb", ...) : cannot open URL 'https:// mirrors.ebi.ac.uk/CRAN/bin/windows/contrib/3.4/BH_1.66.0-1.zip'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
InternetOpenUrl failed: 'The operation timed out'
Warning in download.packages(pkgs, destdir = tmpd, available = available, : download of package ‘BH’ failed trying URL 'https://mirrors.ebi.ac.uk/CRAN/bin/windows/contrib/3.4/plogr_0.1-1.zip' Content type 'application/zip' length 17919 bytes (17 KB) downloaded 17 KB