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
5
votes
0 answers

How can I label variables, data frame columns (full name + units) in such a way that plots, xtable, etc. will automatically use this information?

I have just become aware of the label function in the Hmisc package. Yet, as far as I can see, this function does not solve my problem as axis labels still need to be manually specified as xlab=label(var). I don't see any solution for producing…
5
votes
1 answer

How to append notes to a latex table in Hmisc in R?

An unelegant way is just to add lines of tex code with the note text. But is there a more native way of making notes in latex function of Hmisc package in R?
Anton Tarasenko
  • 8,099
  • 11
  • 66
  • 91
5
votes
1 answer

Does latex(describe(...)) work under knitr with MiKTeX?

When I create a file describe.Rnw as follows: \documentclass{article} \begin{document} <>= require(Hmisc) latex(describe(cars), file="") @ \end{document} and try to compile it with library(knitr) knit2pdf("describe.Rnw") I get…
Peter Ellis
  • 5,694
  • 30
  • 46
4
votes
2 answers

summarise wtd.quantile by group

I want to create a new df using Hmisc::wtd.quantile for a dataframe with many repeating dates. I am grouping by date, using summarize() to aggregate on date, and attempting to use wtd.quantile() on each date (with weights). This is also a pretty…
Francisco
  • 169
  • 1
  • 9
4
votes
2 answers

How to do a triangle heatmap in R using ggplot2, reshape2, and Hmisc?

I need help to do a triangle heatmap in R using ggplot2, reshape2, and Hmisc, because I need to show r and P-values on the plot. I have tried inserting cordata[lower.tri(c),] in numerous places and it hasnt helped. I have also tried using different…
leah73
  • 43
  • 1
  • 4
4
votes
5 answers

Mean and Confidence interval for Groups of Variable in R

I'm new to R and I'm attempting to do something that I believe should be very simple but code online has not helped. data <- structure(list(Group = c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3), Time = c(1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2), mean_PctPasses…
Patrick
  • 915
  • 2
  • 9
  • 26
4
votes
0 answers

Render latex text from within r function in rmarkdown?

I am working within RStudio 1.1.383 using rmarkdown. I am trying to render to Latex a string that is created within a knitr chunk so that it appears as latex code within the document. So far I have experimented with the 'results=' options in the…
4
votes
2 answers

What do the p=0 mean in a correlation matrix using rcorr?

I've been using the rcorr function from the Hmisc package in R. I figured out how it works, I can extract the results, put them in a nice table. I looked at this post: p-values of correlation coefficients. But... Just one remaining thing is bugging…
4
votes
1 answer

Alternatives to R Hmisc package column "labels" on data.frames

I work with data where most header name that are very long strings. These are cryptic but contain important details that cannot be forgotten. Long column names are difficult to work with for various display reasons as well as programmatic ones. To…
raco
  • 67
  • 5
4
votes
1 answer

ggplot2 two data.frames, doesn't know how to deal with data of class uneval

I'm new to R and do not know how to plot two data.frames with ggplot2. I get the following error message: Error: ggplot2 doesn't know how to deal with data of class uneval How can I put together my data with the underlying world map? Here is my…
Til Hund
  • 1,543
  • 5
  • 21
  • 37
4
votes
2 answers

Using cut2 from Hmisc to calculate cuts for different number of groups

I was trying to calculate equal quantile cuts for a vector by using cut2 from Hmisc. library(Hmisc) c <- c(-4.18304,-3.18343,-2.93237,-2.82836,-2.13478,-2.01892,-1.88773, -1.83124,-1.74953,-1.74858,-0.63265,-0.59626,-0.5681) cut2(c, g=3,…
lucyh
  • 179
  • 2
  • 5
  • 14
4
votes
2 answers

Using Hmisc package (R) to produce proc report (SAS) like output?

I have been trying to use the Hmisc package to produce output similar to below. Group Step Method G1 G2 G3 ....... s1 m1 N 45 …
user2117897
  • 95
  • 1
  • 6
3
votes
1 answer

corrplot error: arguments imply differing number of rows

I am trying to generate a correlogram using the rcorr function (hmisc package) and corrplot library("Hmisc") library("corrplot") res2<-rcorr(as.matrix(A), type = "spearman") corrplot(res2$r, order="AOE", p.mat = res2$P, sig.level = 0.05,…
P_aza
  • 107
  • 1
  • 8
3
votes
1 answer

Adding imputed data from a model to a dataset - hmisc aregImpute

I'm trying to impute values from a dataset using hmisc. I'm following this guide. Here is a reproducible example of my code: #Create dataset and add 0.1 NA values randomly data <- iris library(missForest) library(Hmisc) iris.mis <- prodNA(iris, noNA…
ire
  • 491
  • 2
  • 12
  • 26
3
votes
3 answers

Unnesting a dataframe within a dataframe

I have been trying to calculate confidence intervals for binomial distributions through the Hmisc R package. Specifically, I used the binconf function which does its job perfectly. library(plyr) library(Hmisc) Student <- c("A", "B", "C") TP <-…
Michael Matta
  • 394
  • 2
  • 16
1
2
3
14 15