user3437823
user3437823

Reputation: 351

error seqtreedisplay because of GraphViz

I'm trying to reproduce the example in the tutorial (pag 7)

https://cran.r-project.org/web/packages/WeightedCluster/vignettes/WeightedCluster.pdf

Before running

R> seqtreedisplay(wardTree, type="d", border=NA, showdepth=TRUE)

I need to install GraphViz, but it is not in CRAN anymore so I installed it from bioconductor and works fine

source("https://bioconductor.org/biocLite.R")
biocLite("Rgraphviz")

The library I got installed is library(Rgraphviz) and it is correctly loaded but when running R> seqtreedisplay(wardTree, type="d", border=NA, showdepth=TRUE)

I get the error

Error in disstreedisplayInternal(tree = tree, filename = filename, tmpdisstree = tmpdisstree,  : 
   [!] GraphViz was not found. If you haven't, please install GraphViz to use this function: see http://www.graphviz.org
 [!] If GraphViz is installed on your computer, you need to specify the GraphViz installation directory using the argument gvpath='installdir'
 [!] You can also add this directory to the PATH environment variable
 [!] GraphViz installation directory usually looks like 'C:\Program Files\GraphViz'
In addition: Warning message:
running command 'C:\Windows\system32\cmd.exe /c " "\bin\dot.exe"  -Tpng -otmpseqtree4585dc9564c.png tmpseqtree4585dc9564c.dot "' had status 1 

Is that one the library that should be installed and loaded? I'm confused because of the change of names in the library before was GraphViz now it seems to be Rgraphviz

Upvotes: 1

Views: 459

Answers (1)

Gilbert
Gilbert

Reputation: 3669

TraMineR and its seqtreedisplay function do not use the Rgraphviz package.

To use seqtreedisplay, you need to install (outside of R) the independent GraphViz program that you can download from http://www.graphviz.org/.

You may have to add the path to that program in your path.

Upvotes: 1

Related Questions