vincentarelbundock/modelsummary

`datasummary_balance` weights in percentages

Open

#500 建立於 2022年6月13日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)R (73 fork)batch import
good first issue

倉庫指標

Star
 (894 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Conditional on weights being a column, do something like this:

wtpct <- function(x, y) sum(x, na.rm = TRUE) / sum(y, na.rm = TRUE) * 100
datasummary(species * sex + 1 ~ N + flipper_length_mm * Percent(fn = wtpct),
            output = "markdown",
            data = penguins)

貢獻者指南