Learn R Programming

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

Hmisc (version 2.2-3)

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

239,275

Version

2.2-3

License

GPL version 2 or newer

Maintainer

Frank E Harrell Jr

Last Published

March 16th, 2025

Functions in Hmisc (2.2-3)

Hmisc-internal

Internal Hmisc functions
bootkm

Bootstrap Kaplan-Meier Estimates
Lag

Lag a Numeric, Character, or Factor Vector
approxExtrap

Linear Extrapolation
all.is.numeric

Check if All Elements in Character Vector are Numeric
cut2

Cut a Numeric Variable into Intervals
bpplot

Box-percentile plots
sas.get

Convert a SAS Dataset to an S Data Frame
bystats

Statistics by Categories
samplesize.bin

Sample Size for 2-sample Binomial
ecdf

Empirical Cumulative Distribution Plot
Cs

Character strings from unquoted names
histbackback

Back to Back Histograms
dataRep

Representativeness of Observations in a Data Set
summary.formula

Summarize Data for Making Tables and Plots
deff

Design Effect and Intra-cluster Correlation
summarize

Summarize Scalars or Matrices by Cross-Classification
event.chart

Flexible Event Chart for Time-to-Event Data
event.history

Produces event.history graph for survival data
format.df

Format a Data Frame or Matrix for LaTeX or HTML
Misc

Miscellaneous Functions
plotCorrPrecision

Plot Precision of Estimate of Pearson Correlation Coefficient
contents

Metadata for a Data Frame
gbayes

Gaussian Bayesian Posterior and Predictive Distributions
binconf

Confidence Intervals for Binomial Probabilities
labcurve

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

Edit In Place
dotchart2

Enhanced Dot Chart
mtitle

Margin Titles
list.tree

Pretty-print the Structure of a Data Object
pc1

First Principal Component
errbar

Plot Error Bars
popower

Power and Sample Size for Ordinal Response
rcspline.plot

Plot Restricted Cubic Spline Function
sedit

Character String Editing and Miscellaneous Character Handling Functions
rcspline.restate

Re-state Restricted Cubic Spline Function
data.frame.create.modify.check

Tips for Creating, Modifying, and Checking Data Frames
latex

Convert an S object to LaTeX, and Related Utilities
pstamp

Date/Time/Directory Stamp the Current Plot
cpower

Power of Cox/log-rank Two-Sample Test
label

Label Attribute of an Object
hdquantile

Harrell-Davis Distribution-Free Quantile Estimator
ldBands

Group Sequential Boundaries using the Lan-DeMets Approach
rcorrp.cens

Rank Correlation for Paired Predictors with a Censored Response
plsmo

Plot smoothed estimates
wtd.mean

Weighted Statistical Estimates
na.delete

Row-wise Deletion na.action
interaction

Compute the Interaction of Several Factors
na.keep

Do-nothing na.action
html

Convert an S object to HTML
print.char.matrix

Function to print a matrix with stacked cells
sasxport.get

Enhanced Importing of SAS Transport Files using read.xport
getHdata

Download and Install Datasets for Hmisc, Design, and Statistical Modeling
smean.sd

Compute Summary Statistics on a Vector
prnz

Print and Object with its Name
solvet

solve Function with tol argument
reShape

Reshape Matrices and Serial Data
na.detail.response

Detailed Response Variable Information
abs.error.pred

Indexes of Absolute Prediction Error for Linear Models
minor.tick

Minor Tick Marks
rcorr

Matrix of Correlations and Generalized Spearman Rank Correlation
symbol.freq

Graphic Representation of a Frequency Table
rcorr.cens

Rank Correlation for Censored Data
ps.slide

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

Update a Data Frame or Cleanup a Data Frame after Importing
rm.boot

Bootstrap Repeated Measurements Model
Overview

Overview of Hmisc Library
spower

Simulate Power of 2-Sample Test for Survival under Complex Conditions
mgp.axis

Draw Axes With Side-Specific mgp Parameters
impute

Generic Functions and Methods for Imputation
rlegend

Special Version of legend for R
transace

Additive Regression and Transformations using ace or avas
somers2

Somers' Dxy Rank Correlation
spss.get

Enhanced Importing of SPSS Files
rMultinom

Generate Multinomial Random Variables with Varying Probabilities
sys

Run Unix or Dos Depending on System
scat1d

One-Dimensional Scatter Diagram, Spike Histogram, or Density
score.binary

Score a Series of Binary Variables
units

Units Attribute of a Vector
panel.bpplot

Box-Percentile Panel Function for Trellis
t.test.cluster

t-test for Clustered Data
varclus

Variable Clustering
xYplot

xyplot and dotplot with Matrix Variables to Plot Error Bars and Bands
reorder.factor

Reorder Factor Levels
rcspline.eval

Restricted Cubic Spline Design Matrix
.in.

Find Matching (or Non-Matching) Elements
aregImpute

Multiple Imputation using Additive Regression, Bootstrapping, and Predictive Mean Matching
show.pch

Display Colors, Plotting Symbols, and Symbol Numeric Equivalents
bpower

Power and Sample Size for Two-Sample Binomial Test
transcan

Transformations/Imputations using Canonical Variates
find.matches

Find Close Matches
hist.data.frame

Histograms for Variables in a Data Frame
hoeffd

Matrix of Hoeffding's D Statistics
first.word

First Word in a String or Expression
src

Source a File from the Current Working Directory
ciapower

Power of Interaction Test for Exponential Survival
describe

Concise Statistical Description of a Vector, Matrix, Data Frame, or Formula
xy.group

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

Store an Object Permanently
translate

Translate Vector or Matrix of Text Strings