Hello, I'm trying to use the Hmisc package but I'm keep getting strange text defects in Hmisc:html outputs. Here is my code.
## Hmisc package --------------
library(tidyverse)
library(Hmisc)
library(ucidata)
# Load wine data
data(wine)
# Re-code outcome
mydata <- wine %>%
dplyr::mutate(red_wine = ifelse(color == "Red", 1, 0)) %>%
dplyr::select(-color)
s <- Hmisc::summaryM(
fixed_acidity + volatile_acidity + citric_acid + residual_sugar + chlorides + free_sulfur_dioxide +
total_sulfur_dioxide + density + pH + sulphates + alcohol + quality ~ red_wine,
data = mydata,
overall = TRUE,
test = TRUE,
continuous = 5
)
html(s, caption='Predictors according to wine type',
exclude1 = TRUE, npct = 'both', digits = 2,
prmsd = TRUE, brmsd = TRUE, msdsize = mu$smaller2)
Both in RStudio notebook and preview (nb.html file), it shows this.
However, Knit can produce html file without this error. But I would like to see my work in RStudio while working.
Thank you!