Skip to content

Commit

Permalink
edit transformed_data
Browse files Browse the repository at this point in the history
  • Loading branch information
studener committed Jul 30, 2024
1 parent e2b471c commit 3bc57fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/PipeOpTaskSurvClassifDiscTime.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ PipeOpTaskSurvClassifDiscTime = R6Class("PipeOpTaskSurvClassifDiscTime",
# map observed times back
reps = table(long_data$id)
long_data$obs_times = rep(time, each = rows_per_id)
long_data = long_data[, .(id, obs_times, tend, ped_status)]

list(task_disc, long_data)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_that("PipeOpTaskSurvClassifDiscTime", {
# test rows ids are correct
expect_equal(transformed_data$id, correct_ids)
# check columns in the transformed data.table
expect_equal(sort(c("id", "ped_status", "obs_times", pred_task$feature_names)),
expect_equal(sort(c("id", "ped_status", "obs_times", "tend")),
sort(colnames(transformed_data)))

# `ped_status` per interval and per observation is correct
Expand Down

0 comments on commit 3bc57fd

Please sign in to comment.