Learn R Programming

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

Hmisc (version 3.0-0)

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

202,697

Version

3.0-0

License

GPL version 2 or newer

Maintainer

Frank E Harrell Jr

Last Published

March 16th, 2025

Functions in Hmisc (3.0-0)

Lag

Lag a Numeric, Character, or Factor Vector
contents

Metadata for a Data Frame
first.word

First Word in a String or Expression
transace

Additive Regression and Transformations using ace or avas
Cs

Character strings from unquoted names
t.test.cluster

t-test for Clustered Data
ciapower

Power of Interaction Test for Exponential Survival
dropUnusedLevels

Create Temporary Factor Subsetting Function
deff

Design Effect and Intra-cluster Correlation
getHdata

Download and Install Datasets for Hmisc, Design, and Statistical Modeling
find.matches

Find Close Matches
hist.data.frame

Histograms for Variables in a Data Frame
scat1d

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

Score a Series of Binary Variables
dataRep

Representativeness of Observations in a Data Set
event.chart

Flexible Event Chart for Time-to-Event Data
na.delete

Row-wise Deletion na.action
approxExtrap

Linear Extrapolation
errbar

Plot Error Bars
panel.bpplot

Box-Percentile Panel Function for Trellis
somers2

Somers' Dxy Rank Correlation
pc1

First Principal Component
sedit

Character String Editing and Miscellaneous Character Handling Functions
latex

Convert an S object to LaTeX, and Related Utilities
Misc

Miscellaneous Functions
histbackback

Back to Back Histograms
reorder.factor

Reorder Factor Levels
Overview

Overview of Hmisc Library
popower

Power and Sample Size for Ordinal Response
units

Units Attribute of a Vector
show.pch

Display Colors, Plotting Symbols, and Symbol Numeric Equivalents
src

Source a File from the Current Working Directory
dotchart2

Enhanced Dot Chart
rcorrp.cens

Rank Correlation for Paired Predictors with a Censored Response
rcspline.plot

Plot Restricted Cubic Spline Function
solvet

solve Function with tol argument
hoeffd

Matrix of Hoeffding's D Statistics
.in.

Find Matching (or Non-Matching) Elements
all.is.numeric

Check if All Elements in Character Vector are Numeric
rcspline.restate

Re-state Restricted Cubic Spline Function
na.detail.response

Detailed Response Variable Information
smean.sd

Compute Summary Statistics on a Vector
ldBands

Group Sequential Boundaries using the Lan-DeMets Approach
bpplot

Box-percentile plots
hdquantile

Harrell-Davis Distribution-Free Quantile Estimator
rlegend

Special Version of legend for R
xy.group

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

Statistics by Categories
list.tree

Pretty-print the Structure of a Data Object
symbol.freq

Graphic Representation of a Frequency Table
labcurve

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

Store an Object Permanently
ecdf

Empirical Cumulative Distribution Plot
cpower

Power of Cox/log-rank Two-Sample Test
mgp.axis

Draw Axes With Side-Specific mgp Parameters
na.keep

Do-nothing na.action
minor.tick

Minor Tick Marks
label

Label Attribute of an Object
print.char.matrix

Function to print a matrix with stacked cells
describe

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

Convert an S object to HTML
abs.error.pred

Indexes of Absolute Prediction Error for Linear Models
wtd.mean

Weighted Statistical Estimates
transcan

Transformations/Imputations using Canonical Variates
xYplot

xyplot and dotplot with Matrix Variables to Plot Error Bars and Bands
reShape

Reshape Matrices and Serial Data
binconf

Confidence Intervals for Binomial Probabilities
format.df

Format a Data Frame or Matrix for LaTeX or HTML
pstamp

Date/Time/Directory Stamp the Current Plot
aregImpute

Multiple Imputation using Additive Regression, Bootstrapping, and Predictive Mean Matching
Hmisc-internal

Internal Hmisc functions
eip

Edit In Place
summarize

Summarize Scalars or Matrices by Cross-Classification
spower

Simulate Power of 2-Sample Test for Survival under Complex Conditions
impute

Generic Functions and Methods for Imputation
plsmo

Plot smoothed estimates
event.history

Produces event.history graph for survival data
sasxport.get

Enhanced Importing of SAS Transport Files using read.xport
summary.formula

Summarize Data for Making Tables and Plots
translate

Translate Vector or Matrix of Text Strings
gbayes

Gaussian Bayesian Posterior and Predictive Distributions
ps.slide

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

Power and Sample Size for Two-Sample Binomial Test
bootkm

Bootstrap Kaplan-Meier Estimates
sys

Run Unix or Dos Depending on System
rcorr.cens

Rank Correlation for Censored Data
rMultinom

Generate Multinomial Random Variables with Varying Probabilities
rm.boot

Bootstrap Repeated Measurements Model
rcspline.eval

Restricted Cubic Spline Design Matrix
spss.get

Enhanced Importing of SPSS Files
upData

Update a Data Frame or Cleanup a Data Frame after Importing
sas.get

Convert a SAS Dataset to an S Data Frame
mtitle

Margin Titles
rcorr

Matrix of Correlations and Generalized Spearman Rank Correlation
samplesize.bin

Sample Size for 2-sample Binomial
cut2

Cut a Numeric Variable into Intervals
prnz

Print and Object with its Name
data.frame.create.modify.check

Tips for Creating, Modifying, and Checking Data Frames
plotCorrPrecision

Plot Precision of Estimate of Pearson Correlation Coefficient
varclus

Variable Clustering