-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: surv_time
doesn't work with data that only has events
#1258
Comments
The following works. I think it is a matter of having at least one lyt <- rtables::basic_table() |>
rtables::split_cols_by(var = "ARM") |>
tern::surv_time(
vars = "AVAL",
is_event = "is_event"
)
my_anl <- tibble::tribble(
~AVAL, ~ARM, ~is_event,
1, "B", FALSE,
2, "B", TRUE,
1, "A", FALSE,
2, "A", TRUE
)
rtables::build_table(lyt = lyt, df = my_anl)
|
Yup, That is the case of a real study data we are working on. I think the solution show still generates a valid table (even if a split only has events). So either have the same result as previous versions of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
Found a problem when creating a table with survival data where columns are split by a variable and one (or more) groups has only events.
Reproducible examples (via
rtables
, or using onlytern
)Created on 2024-06-21 with reprex v2.1.0
Some possible test to avoid this regression in the future :-)
Created on 2024-06-21 with reprex v2.1.0
Additional notes:
It works with a package manager snapshot from
2023-06-09
with these 3 versions:sessionInfo()
Relevant log output
No response
Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: