RHugin Install Instructions for Linux

Last updated by Kjell Konis on 2017-02-06.

These instructions are a little sparse compared to the instrcutions for Windows and Mac OS X. There are many flavors of Linux so it is not really possible to provide a one-size-fits-all set of instrctions. Please feel free to contact me if you need any help.


The RHugin package provides an R API for the HUGIN Decision Engine (HDE): both the HDE and R must be installed on the computer in order for the RHugin package to function. Since RHugin is distributed as a source package, the tools (compilers, etc.) needed to install R source packages must be installed on your computer.

Install HUGIN and the HUGIN Decision Engine (HDE)

The HUGIN Decision Engine is commercial software available from HUGIN EXPERT.


The products HUGIN Developer (commercial use) and HUGIN Researcher (academic use) include the HUGIN Decision Engine. The HDE is also included with the free demo HUGIN Lite (the only permitted use of the free demo is to evaluate HUGIN). These instructions assume that the HDE you want to link RHugin against is installed in /usr/local/hugin.

RHugin Package Depedencies

The RHugin package has dependencies on the graph and Rgraphviz packages. These packages are part of Bioconductor and can be installed by running the following two R commands.

biocLite(c("graph", "Rgraphviz"))

Install the RHugin Package

First, set the HUGINHOME environment variable so that RHugin can find the HUGIN Decision Engine (HDE). The value (i.e., the “/usr/local/hugin” in the code below) should be the full path to the HDE folder that you installed in the Preliminaries section.

Sys.setenv(HUGINHOME = "/usr/local/hugin")

Then, install the RHugin package from RHugin’s R-Forge repository with the following R command.

install.packages("RHugin", repos = "http://rhugin.r-forge.r-project.org",
                 type = "source", INSTALL_opts="--no-multiarch")

Quick Test

To check that everything went as planned run the following code to plot one of HUGIN’s example networks.

demo("asia", echo = FALSE)

Happy HUGINing with RHugin!

Copyright 2017 Kjell Konis