Questions tagged [hmisc]

Hmisc is an R package of miscellaneous utility functions.

Hmisc is an package of miscellaneous functions by Frank Harrell. It contains many functions useful for , ting, utility operations, functions for computing and power, importing datasets, imputing , advanced table making, , manipulation, conversion of R objects to code, and recoding variables.

Repositories

Other resources

Related tags

216 questions
1
vote
1 answer

How to plot multiple Dotplots in R with Hmisc package

So I've been trying to get two Dotplots (Hmisc package) to turn up in the same graph but R draws them sequentially instead. Anybody know how to draw two Dotplots in the same graph, specifically using the Hmisc package? I've tried somethings…
Manic Lama
  • 65
  • 1
  • 7
1
vote
1 answer

control digits printed by Hmisc::latex on a psych object

I've produced a comparison of correlation matrices using psych::cortest.mat. I'd like to put the output in a Sweave file for production with knitr. When I use the Hmisc::latex() function, it works, but it also produces about 7 digits for each…
spindoctor
  • 1,719
  • 1
  • 18
  • 42
1
vote
1 answer

Hmisc latex fuction need to remove the first line

Im using Hmisc in rmarkdown file. when I create a table this is what I do --- output: pdf_document --- ```{r Arrests Stats, results ='asis', message = FALSE, warning = FALSE, echo = FALSE} # render the…
user3357059
  • 1,122
  • 1
  • 15
  • 30
1
vote
1 answer

CurveRep in Hmisc for clustering longitudinal curves based on 3 time points

I am working on the following project and am exploring the CurveRep() clustering approach provided by Hmisc. (CurveRep clusters individual subjects' longitudinal growth curves according to similar patterns based on the CLARA clustering algorithm).…
1
vote
0 answers

psych and Hmisc packages with describe class

I am on Mac OS 10.10 with R 3.1.1 I have the following dataframe x which I am trying to get its descriptive statistics using describe from psych package (note that I Hmisc package which has the same describe function is detached for…
mallet
  • 2,454
  • 3
  • 37
  • 64
1
vote
1 answer

Difference between Hmisc wtd.var and SAS proc Mean generated weighted variance

I'm getting different results from R and SAS when I try to calculate a weighted variance. Does anyone know what might be causing this difference? I create vectors of weights and values and I then calculate the weighted variance using the Hmisc…
Martin
  • 1,570
  • 3
  • 19
  • 32
1
vote
0 answers

Excessive elements in latex longtable output when more than one row is used in Hmisc

Two very similar commands produce different headers in latex() from Hmisc. The question is: how to get rid of the excessive header that is repeated right in the first page of longtable? latex(data.frame(1:10), caption="Title", longtable=TRUE,…
Anton Tarasenko
  • 8,099
  • 11
  • 66
  • 91
1
vote
1 answer

How do get Hmisc latex function to show only table contents

Running latex(rnorm(5),file="") through the Hmisc package will display both the contents of the table; for example: $-0.8036409661674679$\tabularnewline $ 1.2066652279406598$\tabularnewline but it will also show the table preamble and ending; for…
user2763361
  • 3,789
  • 11
  • 45
  • 81
1
vote
1 answer

hmisc hist in R with density

I'm trying to plot a histogram for a dataframe in R. I'm using the Hmisc package to do the same. It generates a very nice plot for categorical data except for one problem. It displays the frequencies instead of probabilities. Please find a code…
1
vote
2 answers

Group a continuous variable in R

My aim is to compare in a pivot table if there is a link between the presence of one particular shop and the density of population where we can find these shops. For that, I've a CSV file, with 600 exemples of areas where there is OR not the shop.…
jonathan
  • 149
  • 4
  • 11
1
vote
2 answers

Hmisc - cut2 - create factors from times

I'm trying to use the cut2() function from the Hmisc package to create a factor based on time periods. Here's some code: library(Hmisc) i.time <- as.POSIXct("2013-07-16 13:55:14 CEST") f.time <- i.time+as.difftime(1, units="hours") data.points <-…
zelite
  • 1,478
  • 16
  • 37
1
vote
1 answer

Does minor.tick of library Hmisc in R only work for primary axis (side 1 and 2) and not for secondary axis (side 3 and 4)?

How to plot minor.tick in a plot for axes at sides 3 and 4 using library (Hmisc) in R? For example, the minor.tick plots minor ticks for axes (side=1 and 2) but does not produce any minor ticks for the axes (side =3 and…
maxm
  • 113
  • 2
  • 14
1
vote
1 answer

Changing the size of the text in the axis labels of an Ecdf plot

I've constructed an Ecdf plot from the Hmisc package with the following call: require(Hmisc) Ecdf(latency_targ1, group = CONDITION, lty = c(1, 2, 3, 4), lwd = 4, label.curves = list(method = 'arrow', keys = "lines", lwd = 2), xlim…
skleene
  • 389
  • 3
  • 13
0
votes
0 answers

describe() giving error: Error in rep(")", length(fp) - 1) : invalid 'times' argument, on a big dataframe

I want to get summary statistics, using describe(), on a big data frame (11,024 observations and 25,046 variables - most of the variables are transformation of a small number of variables, and very few will be used for modeling). I am outputting the…
0
votes
0 answers

R Studio on Mac - latex command not working

I am trying to use latex function to output regression formula. like this: require(rms)` f <- cph(Surv(...) ~ ...)` latex(f)` but getting an error I don't understand. I installed Xcode, MacTeX. Can anyone help me? Maybe it is a data error? This is…