Skip to content

Commit

Permalink
include pd values in output, much easier to understand
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Jan 18, 2024
1 parent b3d2e29 commit 919f655
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions R/orsf_vint.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,15 @@ orsf_vint <- function(object,
pd_split <- split(pd, by = split_vars)

# for cran
. <- score <- var_1_value <- var_2_value <- NULL
. <- score <- var_1_value <- var_2_value <- pd_values <- NULL

pd_scores <- vapply(
pd_split,
function(dt){
mean(
collapse::fmean(
c(
collapse::fsd(
dt[, .(vi = collapse::fsd(mean)), by = var_1_value][["vi"]]
),
collapse::fsd(
dt[, .(vi = collapse::fsd(mean)), by = var_2_value][["vi"]]
)
collapse::fsd(dt[, .(vi = collapse::fsd(mean)), by = var_1_value][["vi"]]),
collapse::fsd(dt[, .(vi = collapse::fsd(mean)), by = var_2_value][["vi"]])
)
)
},
Expand Down

0 comments on commit 919f655

Please sign in to comment.