Skip to content

Commit

Permalink
[skip style] [skip vbump] Restyle files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 26, 2024
1 parent c3382d4 commit 5117a52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/matching.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ estimate_weights <- function(data,
))
}

if(!is.null(boot_strata)) {
if (!is.null(boot_strata)) {
ch4 <- boot_strata %in% names(data)
if(!all(ch4)) {
stop(paste("follow items in boot_strata does not exist in names(data):", paste(boot_strata[!ch4], collapse = ",")))
if (!all(ch4)) {
stop(paste("follow items in boot_strata does not exist in names(data):", paste(boot_strata[!ch4], collapse = ",")))
}
}

Expand Down Expand Up @@ -128,7 +128,7 @@ estimate_weights <- function(data,
on.exit(suspendInterrupts(set_random_seed(old_seed)))
set.seed(set_seed_boot)

if(!is.null(boot_strata)) {
if (!is.null(boot_strata)) {
use_strata <- subset(data, subset = (!ind), select = boot_strata)
use_strata <- apply(use_strata, 1, paste, collapse = "--") |> factor()
} else {
Expand Down

0 comments on commit 5117a52

Please sign in to comment.