Install

How to Install the healthvis Package

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 install.packages("devtools"). Since healthvis is stored and updated on github, we need to use a function in devtools to install. Once the package is installed, run library(devtools) or 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.

Proxies

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_github(...) above:

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

The set_config() command needs to be customized with your proxy information.

Many thanks to user DCB for tracking this down!

Package Dependencies

healthvis requires rjson and RCurl to communicate with the server. It suggests an additional list of packages (such as survival and 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
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 sessionInfo() command.

Problems?
Email us with any issues you run into!

4 thoughts on “Install

  1. DCB

    hello, I tried to install but I get the next error message

    Installing github repo(s) healthvis/master from hcorrada
    Installing healthvis.zip from https://github.com/hcorrada/healthvis/archive/master.zip
    Error in function (type, msg, asError = TRUE) : couldn’t connect to host

    I can see the github site with my browser, any idea about where’s the problem?

    Thank you in advance, your package looks so good!

    Reply
    1. healthvis Post author

      We’d love to help you sort out any issues you’re having. Please email us: “healthvis [at] gmail [dot] com” and we can help you directly. If many people are running into the same problem, we’ll update the install instructions.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s