1

I'm wondering if anyone out there is familiar enough with the vtable package to diagnose why one of the scenarios below is working while the other is not. The second approach drops the labeled variable from the table that is created. I am an R newbie so maybe it's obvious. I also tried the second approach after creating labels with Hmisc instead of expss and it made no difference.

library('vtable')
library('expss')
data(mtcars)
#Works
label <- data.frame(
  mpg = "Miles per gallon"
)
sumtable(mtcars, group = 'cyl', group.test = TRUE, labels = label)
#does not work
mtcars = apply_labels(mtcars,
                      mpg = "Miles per gallon"
)
sumtable(mtcars, group = 'cyl', group.test = TRUE, labels = TRUE)
ccmullally
  • 41
  • 3
  • 1
    Perhaps, it's better to file an issue to the https://github.com/NickCH-K/vtable/issues. According to the `sumtable` manual your code should work as you expected. – Gregory Demin Dec 12 '21 at 20:18

0 Answers0