How to Obtain Updates to Individual Functions in R Packages Between Releases
This page shows you how to read in source code to override functions in a package. The source code is automatically downloaded form our Subversion repository. The package whose functions you are overriding must already be attached using the
library()
command. Be sure to not save your R workspace at the end of the R session, or you will permanently override functions in future releases of the package. The approach outlined here is meant to be used every time a script is run, assuming you have a good internet connection.
If you have a version of the
Hmisc
package installed that is later than version 3.1-1, you already have the
getLatestSource
function so you can skip step 2. To determine the version of
Hmisc
you have installed, type
library(help='Hmisc')
- In R type
library(Hmisc)
- Type
source('http://biostat.mc.vanderbilt.edu/tmp/getLatestSource.s')
- Run this command to get a list of the latest version of all available files containing functions in a package:
getLatestSource(package='packagename', avail=TRUE)
Omitting the package name implies you are accessing the Hmisc
package
- Run this command to
source()
in the 5 most recently updated functions in the Design
package:
getLatestSource(package='Design', recent=5)
- Run this command to update two functions in
Hmisc
:
getLatestSource(c('aregImpute','cut2'))
This will not get you updates to documentation. To view the latest documentation (although in the R help file markup language) go to our
Subversion repository or click on the following links: