RHugin Install Instructions for Microsoft Windows

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


Read the Preliminaries section even if you already have R, Rtools, and the HUGIN Decision Engine installed. You probably will need to install the Microsoft Visual C++ 2010 Redistributable Package (x64). These instructions have only been tested with 64 bit versions of R and the HDE running on Windows 10 (64 bit).


Preliminaries

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.

Install HUGIN and the HUGIN Decision Engine (HDE)

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

http://www.hugin.com

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).

Install the Microsoft Visual C++ 2010 Redistributable Package (x64)

The dll that RHugin links to in the HDE was created with Microsoft Visual C++ 2010 and requires the runtime components for this compiler to be installed. These runtime components are provided in the package Microsoft Visual C++ 2010 Redistributable Package (x64) that should be downloaded directly from Microsoft.

https://www.microsoft.com/en-us/download/details.aspx?id=14632

If installation fails, the most likely reason is that you already have these components installed (some manufacturers, e.g., Lenovo, preinstall these packages; others don’t). Read the message carefully.

Install R

R is available from the CRAN repository.

https://cloud.r-project.org/

The installer for the most recent version of R can be found by following Download R for Windows > base.

Install Rtools

Since RHugin is distributed as a source package you will also need to install Rtools (the compilers, etc. used to build R). The Rtools installer can be found by following Download R for Windows > Rtools. The most recent version is at the top of the list.

Once these four pieces of software are installed, start R and proceed to the next section.


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.

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

Install the RHugin Package

Use the following R command to install the RHugin package from RHugin’s R-Forge repository.

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 the example networks provided by HUGIN.

library(RHugin)
## Loading RHugin package...
##   RHugin package version: 8.4
##   Hugin Version: Hugin Lite 8.4 (x64)
##   Hugin Location: C:/Program Files/Hugin Expert/Hugin Lite 8.4 (x64)
demo("asia", echo = FALSE)
plot(asia)


Happy HUGINing with RHugin!




Copyright 2017 Kjell Konis