Learn R Programming

⚠️There's a newer version (5.2-3) of this package.Take me there.

Hmisc (version 2.0-4)

Harrell Miscellaneous

Description

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

Copy Link

Version

Install

install.packages('Hmisc')

Monthly Downloads

215,759

Version

2.0-4

License

GPL version 2 or newer

Maintainer

Frank E Harrell Jr

Last Published

March 16th, 2025

Functions in Hmisc (2.0-4)

approxExtrap

Linear Extrapolation
dotchart2

Enhanced Dot Chart
dataRep

Representativeness of Observations in a Data Set
event.history

Produces event.history graph for survival data
cut2

Cut a Numeric Variable into Intervals
describe

Concise Statistical Description of a Vector, Matrix, Data Frame, or Formula
Misc

Miscellaneous Functions
abs.error.pred

Indexes of Absolute Prediction Error for Linear Models
pstamp

Date/Time/Directory Stamp the Current Plot
find.matches

Find Close Matches
html

Convert an S object to HTML
solvet

solve Function with tol argument
Hmisc-internal

Internal Hmisc functions
scat1d

One-Dimensional Scatter Diagram, Spike Histogram, or Density
sys

Run Unix or Dos Depending on System
na.keep

Do-nothing na.action
bpplot

Box-percentile plots
rcspline.eval

Restricted Cubic Spline Design Matrix
aregImpute

Multiple Imputation using Additive Regression, Bootstrapping, and Predictive Mean Matching
hoeffd

Matrix of Hoeffding's D Statistics
reShape

Reshape Matrices and Serial Data
deff

Design Effect and Intra-cluster Correlation
Lag

Lag a Numeric, Character, or Factor Vector
event.chart

Flexible Event Chart for Time-to-Event Data
.in.

Find Matching (or Non-Matching) Elements
first.word

First Word in a String or Expression
transace

Additive Regression and Transformations using ace or avas
labcurve

Label Curves, Make Keys, and Interactively Draw Points and Curves
Overview

Overview of Hmisc Library
rcorr.cens

Rank Correlation for Censored Data
all.is.numeric

Check if All Elements in Character Vector are Numeric
hist.data.frame

Histograms for Variables in a Data Frame
histbackback

Back to Back Histograms
list.tree

Pretty-print the Structure of a Data Object
eip

Edit In Place
interaction

Compute the Interaction of Several Factors
hdquantile

Harrell-Davis Distribution-Free Quantile Estimator
getHdata

Download and Install Datasets for Hmisc, Design, and Statistical Modeling
varclus

Variable Clustering
bystats

Statistics by Categories
score.binary

Score a Series of Binary Variables
label

Label Attribute of an Object
bootkm

Bootstrap Kaplan-Meier Estimates
print.char.matrix

Function to print a matrix with stacked cells
mtitle

Margin Titles
na.delete

Row-wise Deletion na.action
mgp.axis

Draw Axes With Side-Specific mgp Parameters
ldBands

Group Sequential Boundaries using the Lan-DeMets Approach
format.df

Format a Data Frame or Matrix for LaTeX or HTML
minor.tick

Minor Tick Marks
ciapower

Power of Interaction Test for Exponential Survival
ps.slide

Postscript and Adobe PDF Setup for 35mm Slides and Other Formats
bpower

Power and Sample Size for Two-Sample Binomial Test
popower

Power and Sample Size for Ordinal Response
summarize

Summarize Scalars or Matrices by Cross-Classification
units

Units Attribute of a Vector
smean.sd

Compute Summary Statistics on a Vector
errbar

Plot Error Bars
binconf

Confidence Intervals for Binomial Probabilities
gbayes

Gaussian Bayesian Posterior and Predictive Distributions
pc1

First Principal Component
panel.bpplot

Box-Percentile Panel Function for Trellis
plsmo

Plot smoothed estimates
sasxport.get

Enhanced Importing of SAS Transport Files using read.xport
rcspline.plot

Plot Restricted Cubic Spline Function
data.frame.create.modify.check

Tips for Creating, Modifying, and Checking Data Frames
store

Store an Object Permanently
latex

Convert an S object to LaTeX, and Related Utilities
samplesize.bin

Sample Size for 2-sample Binomial
sas.get

Convert a SAS Dataset to an S Data Frame
prnz

Print and Object with its Name
show.pch

Display Colors, Plotting Symbols, and Symbol Numeric Equivalents
rcspline.restate

Re-state Restricted Cubic Spline Function
impute

Generic Functions and Methods for Imputation
t.test.cluster

t-test for Clustered Data
contents

Metadata for a Data Frame
spss.get

Enhanced Importing of SPSS Files
cpower

Power of Cox/log-rank Two-Sample Test
xy.group

Mean x vs. function of y in groups of x
Cs

Character strings from unquoted names
translate

Translate Vector or Matrix of Text Strings
xYplot

xyplot and dotplot with Matrix Variables to Plot Error Bars and Bands
wtd.mean

Weighted Statistical Estimates
rcorr

Matrix of Correlations and Generalized Spearman Rank Correlation
upData

Update a Data Frame or Cleanup a Data Frame after Importing
sedit

Character String Editing and Miscellaneous Character Handling Functions
rMultinom

Generate Multinomial Random Variables with Varying Probabilities
rlegend

Special Version of legend for R
rcorrp.cens

Rank Correlation for Paired Predictors with a Censored Response
transcan

Transformations/Imputations using Canonical Variates
spower

Simulate Power of 2-Sample Test for Survival under Complex Conditions
summary.formula

Summarize Data for Making Tables and Plots
somers2

Somers' Dxy Rank Correlation
na.detail.response

Detailed Response Variable Information
reorder.factor

Reorder Factor Levels
rm.boot

Bootstrap Repeated Measurements Model
src

Source a File from the Current Working Directory
ecdf

Empirical Cumulative Distribution Plot
plotCorrPrecision

Plot Precision of Estimate of Pearson Correlation Coefficient
symbol.freq

Graphic Representation of a Frequency Table