# Hmisc v4.3-1

0

Monthly downloads

## Harrell Miscellaneous

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

## Readme

# Hmisc

Harrell Miscellaneous

# Current Goals

- Continue to refine the summaryX class of functions that replace tables with graphics
- See also bpplotM and tabulr

- See http://biostat.mc.vanderbilt.edu/HmiscNew

# Web Sites

- Overall: http://biostat.mc.vanderbilt.edu/Hmisc
- CRAN: http://cran.r-project.org/web/packages/Hmisc
- Changelog: https://github.com/harrelfe/Hmisc/commits/master

# 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

## Functions in Hmisc

Name | Description | |

Hmisc-internal | Internal Hmisc functions | |

Merge | Merge Multiple Data Frames or Data Tables | |

Cs | Character strings from unquoted names | |

abs.error.pred | Indexes of Absolute Prediction Error for Linear Models | |

Lag | Lag a Numeric, Character, or Factor Vector | |

HmiscOverview | Overview of Hmisc Library | |

Misc | Miscellaneous Functions | |

aregImpute | Multiple Imputation using Additive Regression, Bootstrapping, and Predictive Mean Matching | |

bpower | Power and Sample Size for Two-Sample Binomial Test | |

Ecdf | Empirical Cumulative Distribution Plot | |

GiniMd | Gini's Mean Difference | |

addMarginal | Add Marginal Observations | |

biVar | Bivariate Summaries Computed Separately by a Series of Predictors | |

bpplot | Box-percentile plots | |

bystats | Statistics by Categories | |

all.is.numeric | Check if All Elements in Character Vector are Numeric | |

Save | Faciliate Use of save and load to Remote Directories | |

consolidate | Element Merging | |

contents | Metadata for a Data Frame | |

cpower | Power of Cox/log-rank Two-Sample Test | |

deff | Design Effect and Intra-cluster Correlation | |

approxExtrap | Linear Extrapolation | |

bootkm | Bootstrap Kaplan-Meier Estimates | |

errbar | Plot Error Bars | |

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

equalBins | Multicolumn Formating | |

mhgr | Miscellaneous Functions for Epidemiology | |

binconf | Confidence Intervals for Binomial Probabilities | |

event.convert | Event Conversion for Time-to-Event Data | |

data.frame.create.modify.check | Tips for Creating, Modifying, and Checking Data Frames | |

csv.get | Read Comma-Separated Text Data Files | |

event.chart | Flexible Event Chart for Time-to-Event Data | |

ciapower | Power of Interaction Test for Exponential Survival | |

format.df | Format a Data Frame or Matrix for LaTeX or HTML | |

capitalize | capitalize the first letter of a string | |

gbayes | Gaussian Bayesian Posterior and Predictive Distributions | |

escapeRegex | Escapes any characters that would have special meaning in a reqular expression. | |

hidingTOC | Moving and Hiding Table of Contents | |

colorFacet | Miscellaneous ggplot2 and grid Helper Functions | |

dataRep | Representativeness of Observations in a Data Set | |

format.pval | Format P Values | |

cnvrt.coords | Convert between the 5 different coordinate sytems on a graphical device | |

areg | Additive Regression with Optimal Transformations on Both Sides using Canonical Variates | |

hdquantile | Harrell-Davis Distribution-Free Quantile Estimator | |

discrete | Discrete Vector tools | |

curveRep | Representative Curves | |

dotchart2 | Enhanced Dot Chart | |

dotchart3 | Enhanced Version of dotchart Function | |

cut2 | Cut a Numeric Variable into Intervals | |

getHdata | Download and Install Datasets for Hmisc, rms, and Statistical Modeling | |

dotchartpl | Enhanced Version of dotchart Function for plotly | |

event.history | Produces event.history graph for survival data | |

ggfreqScatter | Frequency Scatterplot | |

first.word | First Word in a String or Expression | |

find.matches | Find Close Matches | |

getRs | Interact with github rscripts Project | |

ffCompress | Transform Data Frame Into a Compact ff Object | |

hoeffd | Matrix of Hoeffding's D Statistics | |

getZip | Open a Zip File From a URL. | |

histboxp | Use plotly to Draw Stratified Spike Histogram and Box Plot Statistics | |

hist.data.frame | Histograms for Variables in a Data Frame | |

label | Label Attribute of an Object | |

latex | Convert an S object to LaTeX, and Related Utilities | |

makeNstr | creates a string that is a repeat of a substring | |

html | Convert an S object to HTML | |

impute | Generic Functions and Methods for Imputation | |

histbackback | Back to Back Histograms | |

minor.tick | Minor Tick Marks | |

mApply | Apply a Function to Rows of a Matrix or Vector | |

mdb.get | Read Tables in a Microsoft Access Database | |

mgp.axis | Draw Axes With Side-Specific mgp Parameters | |

mtitle | Margin Titles | |

na.delete | Row-wise Deletion na.action | |

num.intercepts | Extract number of intercepts | |

latexCheckOptions | Check whether the options for latex functions have been specified. | |

mChoice | Methods for Storing and Analyzing Multiple Choice Variables | |

latexDotchart | Enhanced Dot Chart for LaTeX Picture Environment with epic | |

print.char.matrix | Function to print a matrix with stacked cells | |

na.detail.response | Detailed Response Variable Information | |

knitrSet | knitr Setup and plotly Service Function | |

multLines | Plot Multiple Lines | |

print.char.list | prints a list of lists in a visually readable format. | |

labcurve | Label Curves, Make Keys, and Interactively Draw Points and Curves | |

prnz | Print and Object with its Name | |

legendfunctions | Legend Creation Functions | |

partition | Patitions an object into different sets | |

pc1 | First Principal Component | |

panel.bpplot | Box-Percentile Panel Function for Trellis | |

latexTabular | Convert a Data Frame or Matrix to a LaTeX Tabular | |

prselect | Selectively Print Lines of a Text Vector | |

latexTherm | Create LaTeX Thermometers and Colored Needles | |

list.tree | Pretty-print the Structure of a Data Object | |

rcspline.eval | Restricted Cubic Spline Design Matrix | |

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

rlegend | Special Version of legend for R | |

na.keep | Do-nothing na.action | |

plsmo | Plot smoothed estimates | |

%nin% | Find Matching (or Non-Matching) Elements | |

rm.boot | Bootstrap Repeated Measurements Model | |

rcorr | Matrix of Correlations and P-values | |

rcspline.plot | Plot Restricted Cubic Spline Function | |

somers2 | Somers' Dxy Rank Correlation | |

summaryP | Multi-way Summary of Proportions | |

solvet | solve Function with tol argument | |

summaryRc | Graphical Summarization of Continuous Variables Against a Response | |

rcspline.restate | Re-state Restricted Cubic Spline Function | |

rcorr.cens | Rank Correlation for Censored Data | |

plotCorrPrecision | Plot Precision of Estimate of Pearson Correlation Coefficient | |

plotlyM | plotly Multiple | |

nstr | Creates a string of arbitry length | |

nobsY | Compute Number of Observations for Left Hand Side of Formula | |

popower | Power and Sample Size for Ordinal Response | |

score.binary | Score a Series of Binary Variables | |

translate | Translate Vector or Matrix of Text Strings | |

reShape | Reshape Matrices and Serial Data | |

samplesize.bin | Sample Size for 2-sample Binomial | |

scat1d | One-Dimensional Scatter Diagram, Spike Histogram, or Density | |

sasxport.get | Enhanced Importing of SAS Transport Files using read.xport | |

redun | Redundancy Analysis | |

stata.get | Enhanced Importing of STATA Files | |

xy.group | Mean x vs. function of y in groups of x | |

string.bounding.box | Determine Dimensions of Strings | |

trunc.POSIXt | Return the floor, ceiling, or rounded value of date or time to specified unit. | |

string.break.line | Break a String into Many Lines at Newlines | |

yearDays | Get Number of Days in Year or Month | |

ynbind | Combine Variables in a Matrix | |

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

tabulr | Interface to Tabular Function | |

stringDims | String Dimentions | |

pstamp | Date/Time/Directory Stamp the Current Plot | |

rMultinom | Generate Multinomial Random Variables with Varying Probabilities | |

showPsfrag | Display image from psfrag LaTeX strings | |

stat_plsmo | Add a lowess smoother without counfidence bands. | |

show.pch | Display Colors, Plotting Symbols, and Symbol Numeric Equivalents | |

simRegOrd | Simulate Power for Adjusted Ordinal Regression Two-Sample Test | |

sedit | Character String Editing and Miscellaneous Character Handling Functions | |

spss.get | Enhanced Importing of SPSS Files | |

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

src | Source a File from the Current Working Directory | |

summaryS | Summarize Multiple Response Variables and Make Multipanel Scatter or Dot Plot | |

units | Units Attribute of a Vector | |

smean.sd | Compute Summary Statistics on a Vector | |

subplot | Embed a new plot within an existing plot | |

simplifyDims | List Simplification | |

symbol.freq | Graphic Representation of a Frequency Table | |

xtfrm.labelled | Auxiliary Function Method for Sorting and Ranking | |

sys | Run Unix or Dos Depending on System | |

summarize | Summarize Scalars or Matrices by Cross-Classification | |

upFirst | Change First Letters to Upper Case | |

xYplot | xyplot and dotplot with Matrix Variables to Plot Error Bars and Bands | |

t.test.cluster | t-test for Clustered Data | |

upData | Update a Data Frame or Cleanup a Data Frame after Importing | |

summary.formula | Summarize Data for Making Tables and Plots | |

valueTags | Store Discriptive Information About an Object | |

summaryM | Summarize Mixed Data Types vs. Groups | |

transcan | Transformations/Imputations using Canonical Variates | |

wtd.stats | Weighted Statistical Estimates | |

varclus | Variable Clustering | |

transace | Additive Regression and Transformations using ace or avas | |

No Results! |

## Last month downloads

## Details

Date | 2020-02-07 |

License | GPL (>= 2) |

LazyLoad | Yes |

URL | http://biostat.mc.vanderbilt.edu/Hmisc, https://github.com/harrelfe/Hmisc |

Encoding | UTF-8 |

RoxygenNote | 6.1.1 |

NeedsCompilation | yes |

Packaged | 2020-02-07 13:22:17 UTC; harrelfe |

Repository | CRAN |

Date/Publication | 2020-02-07 15:50:02 UTC |

imports | acepack , base64enc , cluster , data.table , foreign , grid , gridExtra , gtable , htmlTable (>= 1.11.0) , htmltools , latticeExtra , methods , nnet , rpart , viridis |

suggests | chron , ff , ffbase , knitr , mice , plotly (>= 4.5.6) , rlang , rms , tables |

depends | Formula , ggplot2 (>= 2.2) , lattice , survival (>= 3.1-6) |

Contributors | Frank E Harrell Jr |

#### Include our badge in your README

```
[![Rdoc](http://www.rdocumentation.org/badges/version/Hmisc)](http://www.rdocumentation.org/packages/Hmisc)
```