The Gmisc package is a collection of different useful functions for graphics, tables etc that I’ve created/adapted for my own research.
To install use:
reps = c("http://ftp.sunet.se/pub/lang/CRAN", "http://cran.gforge.se") install.packages("Gmisc", repos=reps, dependencies=TRUE)
In case you’re using a Mac you need to install from source:
reps = c("http://ftp.sunet.se/pub/lang/CRAN", "http://cran.gforge.se") install.packages("Gmisc", repos=reps, dependencies=TRUE, type="source")
The main functions that I’ve created are:
- forestplot2 – an adaptation of the rmeta package forestplot with some additional tweaks
- plotHR – this is based upon r-forge Reinhard Seifert’s plotHR function. The function allows multiple models to be plotted on top of eachother, when used together with transparency (the alpha channel of the rgb) it is very convenient for comparing different subgroups, time-spans or adjusted/unadjusted regressions.
- htmlTable – it is often difficult to convert LaTeX into word without some loss to design, therefore I’ve created an alternativ to the Hmisc latex() function with basically the same parameters and output but that works in markdown. I recommend opening the html-document in LibreOffice, and from there exporting to Word. This since Word does a very poor job at reading html formatting.
- printCrudeAndAdjusted – a useful function for generating a table with a models crude and adjusted estimates.
- getDescriptionsStatsBy – for generating a table 1 this is a very useful function that makes this much easier.
I hope you find the package as useful as I do. Once the package reaches the proper maturity I will try to publish it on CRAN.