Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
additional-r-cmd-check-params: --as-cran
additional-env-vars: |
NOT_CRAN=true
coverage:
name: Coverage 📔
uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main
Expand Down
7 changes: 4 additions & 3 deletions R/matching.R
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,18 @@ plot_weights_ggplot <- function(weighted_data, bin_col, vline_col,
})
legend_data <- data.frame(ind = main_title, lab = lab)

values <- median <- NULL # dummy assignment for undefined variable check
hist_plot <- ggplot2::ggplot(wt_data) +
ggplot2::geom_histogram(ggplot2::aes_string(x = "values"), bins = bins, color = bin_col, fill = bin_col) +
ggplot2::geom_vline(ggplot2::aes_string(xintercept = "median"),
ggplot2::geom_histogram(ggplot2::aes(x = values), bins = bins, color = bin_col, fill = bin_col) +
ggplot2::geom_vline(ggplot2::aes(xintercept = median),
color = vline_col,
linetype = "dashed"
) +
ggplot2::theme_bw() +
ggplot2::facet_wrap(~ind, ncol = 1) +
ggplot2::geom_text(
data = legend_data,
ggplot2::aes_string(label = "lab"), x = Inf, y = Inf, hjust = 1, vjust = 1, size = 3
ggplot2::aes(label = lab), x = Inf, y = Inf, hjust = 1, vjust = 1, size = 3
) +
ggplot2::theme(
axis.title = ggplot2::element_text(size = 12),
Expand Down
Loading
Loading