|
compile and propagate functions are generic as of version 0.5-4 for compatibility with the gRain and gRbase packages.
If your Hugin installation is in a non-standard location, you must set the HUGINHOME environment variable in order to use the 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. These two packages (and their dependencies) are available on CRAN. Run the command
install.packages(c("graph", "gRbase"))
in R to install them before installing the RHugin package.
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.2-lite")
install.packages("RHugin", repos = "http://R-Forge.R-project.org", type = "source")
Note that, as of version 0.7-12, the RHugin package dynamically links to the Hugin Decision Engine hence Hugin 7.2 or later is required.
A binary package is provided for Windows.
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.
Only certain versions of Graphviz are compatible with the Rgraphviz package. On Windows XP, Graphviz 2.20.3a seems to work consistently (I only have XP so can not test Vista and Windows 7).
C:\Program Files\Graphviz2.20\bin) to the Windows PATH Environment Variable.biocLite function.
source("http://bioconductor.org/biocLite.R")
biocLite("Rgraphviz")
The Rgraphviz package has an external dependency on Graphviz (http://www.graphviz.org) hence you need to install Graphviz on your computer before attempting to install 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 command in R to build and install the Rgraphviz package.
install.packages("Rgraphviz", repos = "http://www.bioconductor.org", type = "source")
It is also possible to install Rgraphviz using Bioconductor's biocLite function which will install a binary 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.
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.