Skip to content

Commit 0d30c11

Browse files
committed
simpler join syntax
1 parent 5957fdf commit 0d30c11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/expct.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ expct <- function(
233233
sort = FALSE, allow.cartesian = TRUE)
234234
psi_uncond <- merge(omega, params$cat[variable %in% query, ], by.x = 'f_idx_uncond', by.y = 'f_idx',
235235
sort = FALSE, allow.cartesian = TRUE)
236-
psi_uncond_relevant <- psi_uncond[!psi_cond[,.(idx, variable)], on = .(idx, variable), all = FALSE]
236+
psi_uncond_relevant <- psi_uncond[!psi_cond, on = .(idx, variable)]
237237
psi <- rbind(psi_cond, psi_uncond_relevant)
238238
}
239239
psi[NA_share == 1, wt := 0]

R/forge.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ forge <- function(
251251
sort = FALSE, allow.cartesian = TRUE)
252252
psi_uncond <- merge(omega, params$cat, by.x = 'f_idx_uncond', by.y = 'f_idx',
253253
sort = FALSE, allow.cartesian = TRUE)
254-
psi_uncond_relevant <- psi_uncond[!psi_cond[,.(idx, variable)], on = .(idx, variable), all = FALSE]
254+
psi_uncond_relevant <- psi_uncond[!psi_cond, on = .(idx, variable)]
255255
psi <- rbind(psi_cond, psi_uncond_relevant)
256256
}
257257
psi[prob < 1, val := sample(val, 1, prob = prob), by = .(variable, idx)]

0 commit comments

Comments
 (0)