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

Problem passing family argument to fit.mult.impute for multiple imputation with modified Poisson using Hmisc package

I was previously able to run a modified Poisson regression using data created through multiple imputation with the Hmisc package. I ran the code a month ago without issue, but I'm now having problems using the same code and data. Specifically, I am…
0
votes
0 answers

Hmisc package : ERROR in parse(outFile)...unexpected '>'

I am a beginner in R and I am trying to install arrayQualityMetrics package there's an error though in the 'Hmisc' dependency I get this error : Error in parse(outFile) : /tmp/RtmpkFTuHf/R.INSTALLbd637e8c1e92/Hmisc/R/describe.s:1443:63: unexpected…
0
votes
0 answers

How to Set Minimum and Maximum Values in Hmisc Plots in R?

I want to plot all continues and categorical variables together. How can I have minimum and maximum values in plots that I made by Hmisc R package? If you have any suggestion about using of other R packages for this purpose it will be…
0
votes
1 answer

error when applying functions like replace_na() from tidyr on labelled columns of dataframe in R

I get error below when I want to apply a function on the labelled columns. here as an example I applied mean() function. library(tidyr) library(dplyr) library(Hmisc) df <- data.frame(a = LETTERS[1:5], b = c(1,2,NA,4,5)) …
Mathica
  • 1,241
  • 1
  • 5
  • 17
0
votes
1 answer

How to obtain a descriptive LateX table of continuous variable stratified by groups in R

dat <- data.frame(outcome = rnorm(25), sex = sample(c("F", "M"), 25, replace = TRUE), age_group = sample(c(1, 2, 3), 25, replace = TRUE)) > head(dat) outcome sex age_group 1 1.1423 F 2 2 0.0998 M 1 3…
Adrian
  • 9,229
  • 24
  • 74
  • 132
0
votes
1 answer

How to obtain the Latex source code for table generated using Hmisc in R

library(Hmisc) options(digits=3) set.seed(173) sex <- factor(sample(c("m","f"), 500, rep=TRUE)) country <- factor(sample(c('US', 'Canada'), 500, rep=TRUE)) age <- rnorm(500, 50, 5) sbp <- rnorm(500, 120, 12) label(sbp) <- 'Systolic BP' units(sbp) <-…
Adrian
  • 9,229
  • 24
  • 74
  • 132
0
votes
1 answer

summary and plot for multiple subgroups(more columns)

I am interested in two things 1) Summary for multiple subgroups in the same table and 2) dotplot for the subgroups based on the summary generated in step1. For example , if this is my dataset data("pbc") I like to generate summary of…
0
votes
0 answers

Error in Hmisc Package installation and require command (MAC M1)

I just tried to install "Hmisc" package via R software on my MAC (M1) and received the following error: > require(Hmisc) Loading required package: Hmisc **Error: package or namespace load failed for ‘Hmisc’ in loadNamespace(j <- i[[1L]], c(lib.loc,…
0
votes
1 answer

Replacing column names, with matching column names, that have a label attached

I have data as follows: library(data.table) library(haven) library(Hmisc) library(foreign) df <- fread("A B D C E 1 2 2 3 1") For some of the variables I want to add column labels Lbs (mainly for Stata use). Lbl <-…
Tom
  • 2,173
  • 1
  • 17
  • 44
0
votes
1 answer

Getting the labels of the column names (hmisc) and applying them to another dataframe

I have a question similar to this one. I have a dataframe with labels which I can get out as follows: library(data.table) library(haven) library(Hmisc) library(foreign) df <- fread("A B C 1 2 3") label(df$A) <- "Variable label for…
Tom
  • 2,173
  • 1
  • 17
  • 44
0
votes
0 answers

Adding density lines to backtoback histogram

I am using the histbackback function from the Hmisc package to generate two back-to-back histograms. I managed to add colors to the bars, but I did not manage to add density lines to both histograms. Could someone help me out? Here is the code I…
Stex
  • 13
  • 2
0
votes
0 answers

Change breaks in hist.data.frame

Is there a way to individually set the breaks in hist.data.frame from the package Hmisc? I tried to use bins but it doesn't seem to work
0
votes
0 answers

Error installing Hmisc package in R Studio

I'm new in R and I've been having some issues installing Hmisc package in order to elaborate a Spearman's correlation heatmap. The warning and error are as follows: 18 warnings generated. gfortran -mmacosx-version-min=10.13…
0
votes
0 answers

Hmisc describe output when export as latex file giving API error 2

I am new to latex and I am trying to output the R results from describe( ) function through latex( ). A .tex file is being created but it is not giving me a pdf output df = data.frame(A = rnorm(n = 100, 0,1)) %>% dplyr::mutate(B = 2*A+ runif(n =…
0
votes
2 answers

How to use approxExtrap (Hmisc package) with dplyr?

I'm trying to perform linear extrapolation and can't figure out the correct notation to apply the approxExtrap function from the Hmisc package. I have seen some examples, but none that I've been able to apply. I have been able to use the normal…
dd_data
  • 93
  • 5