Learn R Programming

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

Hmisc

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

Copy Link

Version

Install

install.packages('Hmisc')

Monthly Downloads

215,746

Version

4.5-0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

February 28th, 2021

Functions in Hmisc (4.5-0)

Cs

Character strings from unquoted names
Merge

Merge Multiple Data Frames or Data Tables
Hmisc-internal

Internal Hmisc functions
HmiscOverview

Overview of Hmisc Library
GiniMd

Gini's Mean Difference
Ecdf

Empirical Cumulative Distribution Plot
abs.error.pred

Indexes of Absolute Prediction Error for Linear Models
Misc

Miscellaneous Functions
Lag

Lag a Numeric, Character, or Factor Vector
Save

Faciliate Use of save and load to Remote Directories
bpower

Power and Sample Size for Two-Sample Binomial Test
approxExtrap

Linear Extrapolation
areg

Additive Regression with Optimal Transformations on Both Sides using Canonical Variates
biVar

Bivariate Summaries Computed Separately by a Series of Predictors
combplotp

Combination Plot
consolidate

Element Merging
aregImpute

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

Statistics by Categories
bpplot

Box-percentile plots
capitalize

capitalize the first letter of a string
contents

Metadata for a Data Frame
bootkm

Bootstrap Kaplan-Meier Estimates
ciapower

Power of Interaction Test for Exponential Survival
binconf

Confidence Intervals for Binomial Probabilities
cpower

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

Add Marginal Observations
cnvrt.coords

Convert between the 5 different coordinate sytems on a graphical device
all.is.numeric

Check if All Elements in Character Vector are Numeric
curveRep

Representative Curves
csv.get

Read Comma-Separated Text Data Files
dataRep

Representativeness of Observations in a Data Set
deff

Design Effect and Intra-cluster Correlation
dotchartpl

Enhanced Version of dotchart Function for plotly
mhgr

Miscellaneous Functions for Epidemiology
cut2

Cut a Numeric Variable into Intervals
dotchart2

Enhanced Dot Chart
dotchart3

Enhanced Version of dotchart Function
data.frame.create.modify.check

Tips for Creating, Modifying, and Checking Data Frames
discrete

Discrete Vector tools
equalBins

Multicolumn Formating
errbar

Plot Error Bars
estSeqMarkovOrd

estSeqMarkovOrd
describe

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

estSeqSim
colorFacet

Miscellaneous ggplot2 and grid Helper Functions
event.convert

Event Conversion for Time-to-Event Data
getZip

Open a Zip File From a URL
event.history

Produces event.history graph for survival data
escapeRegex

Escapes any characters that would have special meaning in a reqular expression.
find.matches

Find Close Matches
format.pval

Format P Values
format.df

Format a Data Frame or Matrix for LaTeX or HTML
html

Convert an S object to HTML
getHdata

Download and Install Datasets for Hmisc, rms, and Statistical Modeling
hoeffd

Matrix of Hoeffding's D Statistics
first.word

First Word in a String or Expression
histboxp

Use plotly to Draw Stratified Spike Histogram and Box Plot Statistics
histbackback

Back to Back Histograms
knitrSet

knitr Setup and plotly Service Function
labcurve

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

Moving and Hiding Table of Contents
event.chart

Flexible Event Chart for Time-to-Event Data
ggfreqScatter

Frequency Scatterplot
hist.data.frame

Histograms for Variables in a Data Frame
getRs

Interact with github rscripts Project
gbayes

Gaussian Bayesian Posterior and Predictive Distributions
gbayesSeqSim

gbayesSeqSim
mApply

Apply a Function to Rows of a Matrix or Vector
mgp.axis

Draw Axes With Side-Specific mgp Parameters
label

Label Attribute of an Object
mChoice

Methods for Storing and Analyzing Multiple Choice Variables
mtitle

Margin Titles
latexDotchart

Enhanced Dot Chart for LaTeX Picture Environment with epic
latexCheckOptions

Check whether the options for latex functions have been specified.
impute

Generic Functions and Methods for Imputation
intMarkovOrd

Compute Parameters for Proportional Odds Markov Model
na.delete

Row-wise Deletion na.action
na.detail.response

Detailed Response Variable Information
multLines

Plot Multiple Lines
legendfunctions

Legend Creation Functions
partition

Patitions an object into different sets
hdquantile

Harrell-Davis Distribution-Free Quantile Estimator
list.tree

Pretty-print the Structure of a Data Object
latexTherm

Create LaTeX Thermometers and Colored Needles
panel.bpplot

Box-Percentile Panel Function for Trellis
makeNstr

creates a string that is a repeat of a substring
latex

Convert an S object to LaTeX, and Related Utilities
latexTabular

Convert a Data Frame or Matrix to a LaTeX Tabular
nstr

Creates a string of arbitry length
pairUpDiff

pairUpDiff
num.intercepts

Extract number of intercepts
nobsY

Compute Number of Observations for Left Hand Side of Formula
rcorrp.cens

Rank Correlation for Paired Predictors with a Possibly Censored Response, and Integrated Discrimination Index
rcorr.cens

Rank Correlation for Censored Data
na.keep

Do-nothing na.action
%nin%

Find Matching (or Non-Matching) Elements
redun

Redundancy Analysis
mdb.get

Read Tables in a Microsoft Access Database
pc1

First Principal Component
plotCorrPrecision

Plot Precision of Estimate of Pearson Correlation Coefficient
rlegend

Special Version of legend for R
solvet

solve Function with tol argument
soprobMarkovOrd

soprobMarkovOrd
samplesize.bin

Sample Size for 2-sample Binomial
rm.boot

Bootstrap Repeated Measurements Model
spss.get

Enhanced Importing of SPSS Files
popower

Power and Sample Size for Ordinal Response
somers2

Somers' Dxy Rank Correlation
prselect

Selectively Print Lines of a Text Vector
rMultinom

Generate Multinomial Random Variables with Varying Probabilities
rcorr

Matrix of Correlations and P-values
string.bounding.box

Determine Dimensions of Strings
score.binary

Score a Series of Binary Variables
pstamp

Date/Time/Directory Stamp the Current Plot
sedit

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

prints a list of lists in a visually readable format.
minor.tick

Minor Tick Marks
plotlyM

plotly Multiple
string.break.line

Break a String into Many Lines at Newlines
src

Source a File from the Current Working Directory
summary.formula

Summarize Data for Making Tables and Plots
summarize

Summarize Scalars or Matrices by Cross-Classification
sasxport.get

Enhanced Importing of SAS Transport Files using read.xport
spower

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

Multi-way Summary of Proportions
summaryM

Summarize Mixed Data Types vs. Groups
simMarkovOrd

simMarkovOrd
plsmo

Plot smoothed estimates
print.char.matrix

Function to print a matrix with stacked cells
simRegOrd

Simulate Power for Adjusted Ordinal Regression Two-Sample Test
prnz

Print and Object with its Name
reShape

Reshape Matrices and Serial Data
rcspline.restate

Re-state Restricted Cubic Spline Function
sys

Run Unix or Dos Depending on System
symbol.freq

Graphic Representation of a Frequency Table
rcspline.plot

Plot Restricted Cubic Spline Function
simplifyDims

List Simplification
stringDims

String Dimentions
rcspline.eval

Restricted Cubic Spline Design Matrix
subplot

Embed a new plot within an existing plot
tabulr

Interface to Tabular Function
t.test.cluster

t-test for Clustered Data
smean.sd

Compute Summary Statistics on a Vector
summaryRc

Graphical Summarization of Continuous Variables Against a Response
summaryS

Summarize Multiple Response Variables and Make Multipanel Scatter or Dot Plot
trunc.POSIXt

Return the floor, ceiling, or rounded value of date or time to specified unit.
upData

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

function for use in graphs that are used with the psfrag package in LaTeX
transace

Additive Regression and Transformations using ace or avas
wtd.stats

Weighted Statistical Estimates
translate

Translate Vector or Matrix of Text Strings
stat_plsmo

Add a lowess smoother without counfidence bands.
transcan

Transformations/Imputations using Canonical Variates
xtfrm.labelled

Auxiliary Function Method for Sorting and Ranking
show.pch

Display Colors, Plotting Symbols, and Symbol Numeric Equivalents
showPsfrag

Display image from psfrag LaTeX strings
valueTags

Store Discriptive Information About an Object
units

Units Attribute of a Vector
scat1d

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

Enhanced Importing of STATA Files
upFirst

Change First Letters to Upper Case
xYplot

xyplot and dotplot with Matrix Variables to Plot Error Bars and Bands
xy.group

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

Variable Clustering
ynbind

Combine Variables in a Matrix
yearDays

Get Number of Days in Year or Month