R-Forge Logo

The RHugin Package Homepage

The Hugin Decision Engine (HDE) is commercial software developed by HUGIN EXPERT A/S for building and making inference from Bayesian belief networks. The RHugin package provides a suite of functions allowing the HDE to be controlled from within R. The RHugin package can thus be used to build Bayesian belief networks, enter and propagate evidence, and to retrieve beliefs. Additionally, the RHugin package can read and write hkb and NET files, making it easy to work simultaneously with both the RHugin package and the Hugin GUI. A licensed copy of the HDE (or the trial version) is required for the RHugin package to function, hence the target audience for the package is Hugin users who would like to take advantage of the statistical and programatic capabilities of R.

Please note that the RHugin package is not supported by Hugin Expert A/S.

Code and development statistics for the RHugin project are available on the summary page.

News

Installation

If you do not have Hugin installed in the default location you will need to set the HUGINHOME environment variable before using the RHugin package. Also, you will need to modify the HUGINHOME variable in the installation instructions below.

Dependencies

RHugin has dependencies on the Bioconductor packages graph and Rgraphviz. Run the commands

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

to install them.

Installing the RHugin Package on Linux

Install RHugin using the install.packages function in R. The HUGINHOME environment variable must be set to the full path of the Hugin Decision Engine folder.

  Sys.setenv(HUGINHOME = "/usr/local/hugin")
  install.packages("RHugin", repos = "http://rhugin.r-forge.r-project.org")

Installing the RHugin Package on Mac OS X

The RHugin package needs to be installed from source on Mac OS X and you will need to have the Command Line Tools installed on your computer in order to do this. Instructions for installing the Command Line Tools on Mavericks (Mac OS X 10.9) can be found here. These instructions may work on older versions of Mac OS X. If they don't, you will need to install and launch Xcode. Then, from the Xcode menu item, choose Preferences and select the Downloads tab. There should be an option to install the Command Line Tools.

Install RHugin using the install.packages function in R. The HUGINHOME environment variable must be set to the full path of the Hugin Decision Engine folder. In most cases typing Sys.setenv(HUGINHOME = "/Applications/HDE then pressing tab will autocomplete the correct path. The following commands, for example, install the package for Hugin Lite.

  Sys.setenv(HUGINHOME = "/Applications/HDE8.0-x64-lite/")
  install.packages("RHugin", repos = "http://rhugin.r-forge.r-project.org", type = "source")

Note for Mac OS X: R 3.0.0 is now 64 bit only so RHugin will only work with a 64 bit version of the Hugin Decision Engine.

Installing the RHugin Package on Microsoft Windows

Binary packages are provided for Windows.

Download the package corresponding to your version of Hugin then use the "Install package(s) from local zip files..." item from the R Packages menu to install the package.