Error in yaml.load(): argument “error.label” is missing, with no default

I'm currently trying to run the MAPPER algorithm on R, and work through some basic examples found on the website here:

http://bertrand.michel.perso.math.cnrs.fr/Enseignements/TDA/Mapper.html

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?

EDIT:

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

Hi,

using last github version from today, I do not have any issue with you code. (I have yaml 2.1.18 from CRAN)

  • paultpearson/TDAmapper@658de35
  • christophergandrud/networkD3@9c0a9c9

Can you try again ?

1 Like

Hi there, thanks for replying! I've re-installed R, TDAmapper and networkD3 and it still doesn't work. TDAmapper seems to work just fine with the other examples, but when I try to use networkD3, the forceNetwork and simpleNetwork functions keep giving me the same error about the missing error.label. I presume this means that there's some error in installing the package. I've edited in the error message to my original question above - does that give you any clues on where things went wrong and what I can do to fix this?

Did you install the 2 packages with devtools::install_github ?

You should also try to use another mirror for Cran :package: use https://cran.rstudio.com. You can change your repository with options(repos=c(CRAN="https://cran.rstudio.com") in your session before an installation. See if BH install also fail in this case.

As I cannot reproduce your error, it is difficult to help. If after this, still an issue, I will try again.

1 Like

Hi there - thanks for replying! I reinstalled the networkD3 from a different repo and the thing works now! Thank goodness.

If your issue's been resolved would you mind just marking it as such (even if it's your own answer). It makes it easier for people to see which questions still need help.

Thanks

1 Like

Alright done! Sorry about that - wasn't aware of this feature.

1 Like

No problem! Just giving you a heads up!

Great! Glad it could help. :+1: