sjt.grpmean sjPlot 中的结果未正确显示

sjt.grpmean results inside sjPlot are not correctly displayed

我的 sjPlot 命令有问题:sjt.grpmean

这是我的例子:

x <- rnorm(120,1230,220)
f <- c(rep("men",60),rep("women",60))
d <- data.frame(x,f)

library(sjPlot)

sjt.grpmean(var.cnt = d$x,
            var.grp = d$f)

结果很奇怪。

我试试这个:

x <- rnorm(120,1230,220)
f <- as.factor(c(rep("men",60),rep("women",60)))
d <- data.frame(x,f)

library(sjPlot)
sjt.grpmean(var.cnt = d$x,d$f)

同样奇怪的结果。

我可以使用这个解决方法:

sjt.grpmean(var.cnt = d$x,
            var.grp = d$f,
            value.labels = c("men","women"))

但是,为什么我需要使用 value.labels 来修复? 这是一个错误吗?

如有任何帮助,我将不胜感激。

R 版本 3.3.2 (2016-10-31)

sjPlot 2.3.0

is this a bug?

是的,这是您发现的错误。我已经在 GitHub 的当前开发版本中修复了它,可能会在 3 月份进行 CRAN 更新...