tbl_summary()不显示r中的是/否级别
在下面的数据框架中,G变量具有两个级别,但是TBL_Summary()没有显示其级别。
data.frame(a=c(0,1,2),
b=c(0,1,2),
f=c("m", "f", "m"),
g = c("Yes", "No", "Yes"),
output = c(0,1,0)) %>%
tbl_summary(by=output)
a b f g output
1 0 0 m Yes 0
2 1 1 f No 1
3 2 2 m Yes 0
我尝试关注 r gtsummary软件包并未显示出因子级别摘要表但不幸的是我无法解决这个问题。我很感谢任何提示或帮助这一点?
in data frame below g variable has two levels, however tbl_summary() is not showing the its levels.
data.frame(a=c(0,1,2),
b=c(0,1,2),
f=c("m", "f", "m"),
g = c("Yes", "No", "Yes"),
output = c(0,1,0)) %>%
tbl_summary(by=output)
a b f g output
1 0 0 m Yes 0
2 1 1 f No 1
3 2 2 m Yes 0
I tried following R gtsummary package doesnt show the factor levels in the summary table but unfortunately I could not solve this issue. I would appreciate any hint or help with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在
> tbl_summary
中使用type
来指定如何显示它。对于特定列:
所有“是”/“否”列:
所有二分法变量(@daniel D. Sjoberg):
输出:
You could use
type
intbl_summary
to specify how to display it.For specific columns:
All "Yes"/"No" columns:
All dichotomous variables (@Daniel D. Sjoberg):
Output: