|
compile and propagate functions are generic as of version 0.5-4 for compatibility with the gRain and gRbase packages.
If you do not have Hugin installed in the default location, you will need to set the HUGINHOME environment variable in order to use the RHugin package (see the Hugin API Reference Manual). Also, you will need to modify the HUGINHOME variable in the installation instructions below.
The RHugin package depends on the graph and gRbase packages. In R, run the commands
source("http://bioconductor.org/biocLite.R")
biocLite("graph")
to install the graph package from Bioconductor and the command
install.packages("gRbase")
to install the gRbase package from CRAN. The graph package should be installed first since it is also needed by the gRbase package and is not available from CRAN.
Linux users can install the package using the install.packages function in R.
Sys.setenv(HUGINHOME = "/usr/local/hugin")
install.packages("RHugin", repos = "http://R-Forge.R-project.org")
Mac OS X users can install the package using the install.packages function as well. 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 give the correct path. The following commands install the package for Hugin Lite.
Sys.setenv(HUGINHOME = "/Applications/HDE7.5-lite")
install.packages("RHugin", repos = "http://R-Forge.R-project.org", type = "source")
As of version 0.7-12, the RHugin package dynamically links to the Hugin Decision Engine hence Hugin 7.2 or later is required.
Binary packages 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.
RHugin uses the Rgraphviz package to plot Hugin domains and to position nodes in hkb and NET files.
The Rgraphviz package is quite sensitive to the specific versions of Graphviz and R installed on the computer. The binary package provided here was built using Graphviz 2.28.0 and R 2.13.x and has been tested on Windows XP, Vista, and 7.
C:\Program Files (x86)\Graphviz 2.28\bin) to the Windows Path Environment Variable.The Rgraphviz package has an external dependency on Graphviz (http://www.graphviz.org), so you need to install Graphviz on your computer before installing the Rgraphviz package. You can download the latest version of Graphviz for Max OS X from the following link.
http://www.graphviz.org/Download_macos.phpNote that snowleopard refers to Mac OS X version 10.6 and leopard refers to Mac OS X version 10.5. Older versions of Mac OS X (e.g., Tiger) are not supported by Graphviz. You can find your Mac OS X version by clicking on the Apple menu and selecting About This Mac. Graphviz is distributed as a package for Mac OS X's Installer.app. Double click the downloaded file and follow the instructions to install the software.
Once Graphviz has been installed, run the following commands in R to build and install the Rgraphviz package.
source("http://bioconductor.org/biocLite.R")
biocLite("Rgraphviz", type = "source")
Note: if you do not have the developer tools installed, you can omit the type argument to install the binary version of the Rgraphviz package. The binary package is built for a specific version of Graphviz and if that version does not match the version on your computer, it may cause problems (although I haven't noticed any yet).
Graphviz must be installed on the computer in order for the Rgraphviz package to work. Graphviz can be obtained from the Graphviz website. Once Graphviz has been installed, follow the Bioconductor instructions to install Rgraphviz.