Skip to content

vpc_tte(rtte = TRUE) with rtte_calc_diff = FALSE or rtte_conditional = FALSE fails with "time must be a vector, not a function" unless the data have a column named t - #129

Merged
roninsightrx merged 1 commit into
masterfrom
nightshift/128-vpc-tte-rtte-true-with-rtte-calc-diff
Nov 14, 2026

Conversation

@roninsightrx

Copy link
Copy Markdown
Collaborator

Closes #128

format_vpc_input_data_tte() now stores the original absolute time in an internal time_abs column for RTTE data, and vpc_tte() uses it (instead of the undefined t) for censoring marks, so rtte_calc_diff = FALSE / rtte_conditional = FALSE no longer error. Added regression test, bumped version to 1.3.7 with NEWS entry.


🤖 Implemented by Claude Code and reviewed by Codex, orchestrated by nightshift. Review rounds are posted as comments below.

With rtte_calc_diff = FALSE or rtte_conditional = FALSE, censoring marks
were placed at `t`, which resolved to base::t() unless the data had such a
column. Store the original absolute time as an internal `time_abs` column
in format_vpc_input_data_tte() and use that instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@roninsightrx roninsightrx left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Codex review, round 1: ✅ approved

The implementation correctly preserves absolute time before RTTE conversion and uses it for censoring marks across all affected flag combinations. Tests adequately cover the regression. Full suite: 601 passed, 0 failed (5 unrelated plot warnings).

@roninsightrx
roninsightrx marked this pull request as ready for review November 14, 2026 19:27
@roninsightrx
roninsightrx merged commit cb28113 into master Nov 14, 2026
5 checks passed
@roninsightrx
roninsightrx deleted the nightshift/128-vpc-tte-rtte-true-with-rtte-calc-diff branch November 14, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant