Hmisc v4.4-0


Monthly downloads



Harrell Miscellaneous

Contains many functions useful for data analysis, high-level graphics, utility operations, functions for computing sample size and power, importing and annotating datasets, imputing missing values, advanced table making, variable clustering, character string manipulation, conversion of R objects to LaTeX and html code, and recoding variables.



Harrell Miscellaneous

Current Goals

Web Sites

To Do

  • Consider using the haven package for importing SAS, Stata, and SPSS files; haven stores labels as the label attribute of each variable as does Hmisc; it converts date and time variables automatically and allows one to specify a format catalog along with the primary dataset
  • See if the readstata13 package has advantages over the foreign package for Stata file import
  • Consider creating xl.get using the readxl package to read .xls and .xlsx Excel files
  • In impute.transcan, sense if a variable in data is not a factor whereas it was treated as a factor during aregImpute; it should be converted to factor before the line v[sub] <- ... levels(as.integer...)) is run

Functions in Hmisc

Name Description
Save Faciliate Use of save and load to Remote Directories
bpplot Box-percentile plots
cpower Power of Cox/log-rank Two-Sample Test
Lag Lag a Numeric, Character, or Factor Vector
contents Metadata for a Data Frame
event.convert Event Conversion for Time-to-Event Data
HmiscOverview Overview of Hmisc Library
cut2 Cut a Numeric Variable into Intervals
Merge Merge Multiple Data Frames or Data Tables
Misc Miscellaneous Functions
getHdata Download and Install Datasets for Hmisc, rms, and Statistical Modeling
getRs Interact with github rscripts Project
histbackback Back to Back Histograms
data.frame.create.modify.check Tips for Creating, Modifying, and Checking Data Frames
approxExtrap Linear Extrapolation
event.history Produces event.history graph for survival data
ciapower Power of Interaction Test for Exponential Survival
histboxp Use plotly to Draw Stratified Spike Histogram and Box Plot Statistics
biVar Bivariate Summaries Computed Separately by a Series of Predictors
describe Concise Statistical Description of a Vector, Matrix, Data Frame, or Formula
combplotp Combination Plot
latexTabular Convert a Data Frame or Matrix to a LaTeX Tabular
cnvrt.coords Convert between the 5 different coordinate sytems on a graphical device
aregImpute Multiple Imputation using Additive Regression, Bootstrapping, and Predictive Mean Matching
areg Additive Regression with Optimal Transformations on Both Sides using Canonical Variates
latexDotchart Enhanced Dot Chart for LaTeX Picture Environment with epic
na.detail.response Detailed Response Variable Information
Ecdf Empirical Cumulative Distribution Plot
binconf Confidence Intervals for Binomial Probabilities
Cs Character strings from unquoted names
print.char.matrix Function to print a matrix with stacked cells
capitalize capitalize the first letter of a string
discrete Discrete Vector tools
bootkm Bootstrap Kaplan-Meier Estimates
deff Design Effect and Intra-cluster Correlation
consolidate Element Merging
bystats Statistics by Categories
prnz Print and Object with its Name
GiniMd Gini's Mean Difference
dataRep Representativeness of Observations in a Data Set
na.keep Do-nothing na.action
mhgr Miscellaneous Functions for Epidemiology
pstamp Date/Time/Directory Stamp the Current Plot
find.matches Find Close Matches
escapeRegex Escapes any characters that would have special meaning in a reqular expression.
dotchartpl Enhanced Version of dotchart Function for plotly
Hmisc-internal Internal Hmisc functions
hidingTOC Moving and Hiding Table of Contents
prselect Selectively Print Lines of a Text Vector Check if All Elements in Character Vector are Numeric
ffCompress Transform Data Frame Into a Compact ff Object
addMarginal Add Marginal Observations
format.pval Format P Values
event.chart Flexible Event Chart for Time-to-Event Data
redun Redundancy Analysis Compute Summary Statistics on a Vector
dotchart2 Enhanced Dot Chart
mChoice Methods for Storing and Analyzing Multiple Choice Variables
format.df Format a Data Frame or Matrix for LaTeX or HTML
knitrSet knitr Setup and plotly Service Function
hdquantile Harrell-Davis Distribution-Free Quantile Estimator
gbayes Gaussian Bayesian Posterior and Predictive Distributions
first.word First Word in a String or Expression
curveRep Representative Curves
dotchart3 Enhanced Version of dotchart Function
ggfreqScatter Frequency Scatterplot Histograms for Variables in a Data Frame
minor.tick Minor Tick Marks
rlegend Special Version of legend for R
makeNstr creates a string that is a repeat of a substring
impute Generic Functions and Methods for Imputation
csv.get Read Comma-Separated Text Data Files
solvet solve Function with tol argument
labcurve Label Curves, Make Keys, and Interactively Draw Points and Curves
label Label Attribute of an Object
html Convert an S object to HTML
summaryRc Graphical Summarization of Continuous Variables Against a Response
mtitle Margin Titles
num.intercepts Extract number of intercepts
nstr Creates a string of arbitry length
list.tree Pretty-print the Structure of a Data Object
mdb.get Read Tables in a Microsoft Access Database
mApply Apply a Function to Rows of a Matrix or Vector
t.test.cluster t-test for Clustered Data
plotCorrPrecision Plot Precision of Estimate of Pearson Correlation Coefficient
hoeffd Matrix of Hoeffding's D Statistics
summaryS Summarize Multiple Response Variables and Make Multipanel Scatter or Dot Plot
pc1 First Principal Component
mgp.axis Draw Axes With Side-Specific mgp Parameters
reShape Reshape Matrices and Serial Data
wtd.stats Weighted Statistical Estimates
plotlyM plotly Multiple
xYplot xyplot and dotplot with Matrix Variables to Plot Error Bars and Bands
multLines Plot Multiple Lines
panel.bpplot Box-Percentile Panel Function for Trellis
na.delete Row-wise Deletion na.action
show.pch Display Colors, Plotting Symbols, and Symbol Numeric Equivalents
equalBins Multicolumn Formating
sasxport.get Enhanced Importing of SAS Transport Files using read.xport
errbar Plot Error Bars
partition Patitions an object into different sets
tabulr Interface to Tabular Function
plsmo Plot smoothed estimates
rcspline.plot Plot Restricted Cubic Spline Function
getZip Open a Zip File From a URL.
showPsfrag Display image from psfrag LaTeX strings
colorFacet Miscellaneous ggplot2 and grid Helper Functions
scat1d One-Dimensional Scatter Diagram, Spike Histogram, or Density
rMultinom Generate Multinomial Random Variables with Varying Probabilities
rm.boot Bootstrap Repeated Measurements Model
stat_plsmo Add a lowess smoother without counfidence bands.
src Source a File from the Current Working Directory
spss.get Enhanced Importing of SPSS Files
latexTherm Create LaTeX Thermometers and Colored Needles
legendfunctions Legend Creation Functions
rcorr Matrix of Correlations and P-values
stata.get Enhanced Importing of STATA Files
latexCheckOptions Check whether the options for latex functions have been specified.
latex Convert an S object to LaTeX, and Related Utilities
summaryM Summarize Mixed Data Types vs. Groups
rcspline.eval Restricted Cubic Spline Design Matrix
rcspline.restate Re-state Restricted Cubic Spline Function
samplesize.bin Sample Size for 2-sample Binomial
somers2 Somers' Dxy Rank Correlation
spower Simulate Power of 2-Sample Test for Survival under Complex Conditions
nobsY Compute Number of Observations for Left Hand Side of Formula
%nin% Find Matching (or Non-Matching) Elements
summaryP Multi-way Summary of Proportions Determine Dimensions of Strings
transcan Transformations/Imputations using Canonical Variates
symbol.freq Graphic Representation of a Frequency Table
sys Run Unix or Dos Depending on System
xtfrm.labelled Auxiliary Function Method for Sorting and Ranking
summarize Summarize Scalars or Matrices by Cross-Classification
varclus Variable Clustering
units Units Attribute of a Vector
string.break.line Break a String into Many Lines at Newlines
print.char.list prints a list of lists in a visually readable format.
translate Translate Vector or Matrix of Text Strings
rcorrp.cens Rank Correlation for Paired Predictors with a Possibly Censored Response, and Integrated Discrimination Index
summary.formula Summarize Data for Making Tables and Plots
valueTags Store Discriptive Information About an Object
trunc.POSIXt Return the floor, ceiling, or rounded value of date or time to specified unit. Mean x vs. function of y in groups of x
upFirst Change First Letters to Upper Case
popower Power and Sample Size for Ordinal Response
rcorr.cens Rank Correlation for Censored Data
upData Update a Data Frame or Cleanup a Data Frame after Importing
score.binary Score a Series of Binary Variables
sedit Character String Editing and Miscellaneous Character Handling Functions
simRegOrd Simulate Power for Adjusted Ordinal Regression Two-Sample Test
simplifyDims List Simplification
tex function for use in graphs that are used with the psfrag package in LaTeX
subplot Embed a new plot within an existing plot
transace Additive Regression and Transformations using ace or avas
yearDays Get Number of Days in Year or Month
ynbind Combine Variables in a Matrix
stringDims String Dimentions
bpower Power and Sample Size for Two-Sample Binomial Test
abs.error.pred Indexes of Absolute Prediction Error for Linear Models
No Results!

Last month downloads


Date 2020-03-22
License GPL (>= 2)
LazyLoad Yes
Encoding UTF-8
RoxygenNote 7.0.2
NeedsCompilation yes
Packaged 2020-03-22 16:15:49 UTC; harrelfe
Repository CRAN
Date/Publication 2020-03-23 07:20:17 UTC

Include our badge in your README