Learn R Programming

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

Hmisc (version 2.0-9)

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

2.0-9

License

GPL version 2 or newer

Maintainer

Frank E Harrell Jr

Last Published

March 16th, 2025

Functions in Hmisc (2.0-9)

mtitle

Margin Titles
abs.error.pred

Indexes of Absolute Prediction Error for Linear Models
bystats

Statistics by Categories
labcurve

Label Curves, Make Keys, and Interactively Draw Points and Curves
rcorr.cens

Rank Correlation for Censored Data
histbackback

Back to Back Histograms
rlegend

Special Version of legend for R
Lag

Lag a Numeric, Character, or Factor Vector
first.word

First Word in a String or Expression
transcan

Transformations/Imputations using Canonical Variates
na.detail.response

Detailed Response Variable Information
bootkm

Bootstrap Kaplan-Meier Estimates
na.delete

Row-wise Deletion na.action
sas.get

Convert a SAS Dataset to an S Data Frame
xy.group

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

Matrix of Hoeffding's D Statistics
find.matches

Find Close Matches
na.keep

Do-nothing na.action
binconf

Confidence Intervals for Binomial Probabilities
ecdf

Empirical Cumulative Distribution Plot
rcorrp.cens

Rank Correlation for Paired Predictors with a Censored Response
ps.slide

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

Power and Sample Size for Two-Sample Binomial Test
list.tree

Pretty-print the Structure of a Data Object
panel.bpplot

Box-Percentile Panel Function for Trellis
latex

Convert an S object to LaTeX, and Related Utilities
src

Source a File from the Current Working Directory
Hmisc-internal

Internal Hmisc functions
reorder.factor

Reorder Factor Levels
ciapower

Power of Interaction Test for Exponential Survival
solvet

solve Function with tol argument
scat1d

One-Dimensional Scatter Diagram, Spike Histogram, or Density
sasxport.get

Enhanced Importing of SAS Transport Files using read.xport
data.frame.create.modify.check

Tips for Creating, Modifying, and Checking Data Frames
contents

Metadata for a Data Frame
reShape

Reshape Matrices and Serial Data
spss.get

Enhanced Importing of SPSS Files
label

Label Attribute of an Object
dotchart2

Enhanced Dot Chart
pc1

First Principal Component
units

Units Attribute of a Vector
getHdata

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

Box-percentile plots
plotCorrPrecision

Plot Precision of Estimate of Pearson Correlation Coefficient
ldBands

Group Sequential Boundaries using the Lan-DeMets Approach
aregImpute

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

Power and Sample Size for Ordinal Response
summary.formula

Summarize Data for Making Tables and Plots
rcspline.eval

Restricted Cubic Spline Design Matrix
wtd.mean

Weighted Statistical Estimates
spower

Simulate Power of 2-Sample Test for Survival under Complex Conditions
event.history

Produces event.history graph for survival data
hdquantile

Harrell-Davis Distribution-Free Quantile Estimator
dataRep

Representativeness of Observations in a Data Set
all.is.numeric

Check if All Elements in Character Vector are Numeric
mgp.axis

Draw Axes With Side-Specific mgp Parameters
rMultinom

Generate Multinomial Random Variables with Varying Probabilities
prnz

Print and Object with its Name
show.pch

Display Colors, Plotting Symbols, and Symbol Numeric Equivalents
varclus

Variable Clustering
rcorr

Matrix of Correlations and Generalized Spearman Rank Correlation
sys

Run Unix or Dos Depending on System
rm.boot

Bootstrap Repeated Measurements Model
hist.data.frame

Histograms for Variables in a Data Frame
symbol.freq

Graphic Representation of a Frequency Table
smean.sd

Compute Summary Statistics on a Vector
somers2

Somers' Dxy Rank Correlation
errbar

Plot Error Bars
rcspline.restate

Re-state Restricted Cubic Spline Function
impute

Generic Functions and Methods for Imputation
rcspline.plot

Plot Restricted Cubic Spline Function
summarize

Summarize Scalars or Matrices by Cross-Classification
translate

Translate Vector or Matrix of Text Strings
.in.

Find Matching (or Non-Matching) Elements
Cs

Character strings from unquoted names
describe

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

Convert an S object to HTML
interaction

Compute the Interaction of Several Factors
Overview

Overview of Hmisc Library
transace

Additive Regression and Transformations using ace or avas
gbayes

Gaussian Bayesian Posterior and Predictive Distributions
approxExtrap

Linear Extrapolation
plsmo

Plot smoothed estimates
deff

Design Effect and Intra-cluster Correlation
pstamp

Date/Time/Directory Stamp the Current Plot
sedit

Character String Editing and Miscellaneous Character Handling Functions
print.char.matrix

Function to print a matrix with stacked cells
Misc

Miscellaneous Functions
cpower

Power of Cox/log-rank Two-Sample Test
format.df

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

Minor Tick Marks
upData

Update a Data Frame or Cleanup a Data Frame after Importing
score.binary

Score a Series of Binary Variables
samplesize.bin

Sample Size for 2-sample Binomial
t.test.cluster

t-test for Clustered Data
cut2

Cut a Numeric Variable into Intervals
event.chart

Flexible Event Chart for Time-to-Event Data
xYplot

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

Store an Object Permanently
eip

Edit In Place