While reviewing #673, I noticed that to_integer() removes the column spending_time from the bound table. Is this a bug? Below is a reprex using the latest commit on main, 732921e:
library("gsDesign2")
x <- gs_design_ahr()
colnames(x$bound)
## [1] "analysis" "bound" "probability" "probability0" "z" "~hr at bound"
## [7] "nominal p" "spending_time"
xint <- to_integer(x)
colnames(xint$bound)
## [1] "analysis" "bound" "probability" "probability0" "z" "~hr at bound"
## [7] "nominal p"
summary(x, display_spending_time = TRUE)
## # A tibble: 1 × 8
## # Groups: Analysis [1]
## Analysis Bound Z `Spending time` `~HR at bound` `Nominal p` `Alternate hypothesis` `Null hypothesis`
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Analysi… Effi… 1.96 1 0.795 0.025 0.9 0.025
summary(xint, display_spending_time = TRUE)
## Error in `select()` at gsDesign2/R/summary.R:349:3:
## ℹ In argument: `all_of(col_vars)`.
## Caused by error in `all_of()`:
## ! Can't subset elements that don't exist.
## ✖ Element `Spending time` doesn't exist.
## Run `rlang::last_trace()` to see where the error occurred.
While reviewing #673, I noticed that
to_integer()removes the columnspending_timefrom the bound table. Is this a bug? Below is a reprex using the latest commit on main, 732921e: