Search code examples
rgraphviztraminer

I installed GraphViz to run the 'seqtreedisplay' function in R (TraMineR), but I keep running into error messages


I am trying to run the 'seqtreedisplay()' function using TraMineR, but I keep running into the error message below:

> seqtreedisplay(wardTree, type = "d", border = NA, show.depth = TRUE)

[>] GraphViz version found. 지정된 경로를 찾을 수 없습니다. 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'

I installed the graphviz-5.0.1 (64-bit) EXE installer in C:\Program Files\Graphviz. I also checked whether it was properly installed (click to see image →) by running the 'dot -V' command. Paths were also added to the environment variable (both user and system).

I went through these processes several times, restarted the computer after adding the path to the system, and reinstalled various versions of GraphViz. Plus, I also tried to (click to see image →) add the directory to GraphViz in R and tried the gvpath as well. However, the same error message comes up.

I think the installation of GraphViz has been successful, but R (I use RStudio) is just not able to find the path to GraphViz. Does anyone know what the problem might be?


Solution

  • I once had similar problems. In my case, the solution was to put the GraphViz directory directly into the seqtreedisplaycall. Maybe this also works for you.

    # specify GraphViz directory
    graphviz.dir <- "C:/Program Files/GraphViz"
    
    # call seqtreedisplay and provide GraphViz directoy
    seqtreedisplay(...,
                   gvpath = graphviz.dir)