How to Install the
1. Make sure you have R installed.
healthvis was written on R 2.15.3, so if you have an older version you may run into some compatibility issues. Check your version by running
R.Version(). (Note: the package has been successfully tested on R 3.0.0 as well!)
2. Install the
devtools package by running
healthvis is stored and updated on github, we need to use a function in
devtools to install. Once the package is installed, run
require(devtools) to load the library into R.
3. Run the following command:
install_github("healthvis", username="hcorrada", subdir="pkg")
This command will proceed to install
healthvis and its dependencies into your R library directory. You can now run the command
library(healthvis) to load in the installed package.
4. Once the package is loaded, you can use the function
listHealthVis() to see what functions are currently available. You can use the standard R help query
?[function name] to learn more about each function and find some run-able example code.
Some users have run into the following error when using the instructions above:
Error in function (type, msg, asError = TRUE) : couldn't connect to host. This is likely due to the use of proxies (which would prevent you from installing any package from github), and can be rectified using the
httr package. Run the following commands before
install.packages("httr") library(devtools) library(httr) set_config(use_proxy(url="http://proxyname.company.com",port=8080,username="YourUserName",password="YourPassword")) install_github("healthvis", username="hcorrada", subdir="pkg")
set_config() command needs to be customized with your proxy information.
Many thanks to user DCB for tracking this down!
RCurl to communicate with the server. It suggests an additional list of packages (such as
nnet) that contain functions whose results can be visualized using
healthvis. We also strongly suggest the package
colorspace or an equivalent because we believe that color choice is an important part of data visualization (check out this paper for more info on the subject).
Updating the package is as easy as re-running the
install_github command above. You can do this anytime we have an update. Another way to check if you should update is to check the version number in the header above and compare it to the version of the package in your environment by running the
Email us with any issues you run into!