Skip to content

Conversation

@LittleBeannie
Copy link
Collaborator

  • Update gs_design_ahr to output spending time
  • Update summary with a new argument display_spending_time to allow outputting spending time or not (default is FALSE)
  • Update as_gt

- update `gs_design_ahr` to output spending time
- update `summary` with a new argument to allow outputting spending time or not
- update `as_gt`
@LittleBeannie LittleBeannie linked an issue Dec 17, 2025 that may be closed by this pull request
Copy link
Collaborator

@jdblischak jdblischak left a comment

Choose a reason for hiding this comment

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

I tested this locally. Overall looking good! To start I have some minor comments on how to organize the R code

@jdblischak
Copy link
Collaborator

The macOS build failed during the setup due to a known temporary problem (yihui/litedown#112). I restarted the build.

@jdblischak
Copy link
Collaborator

The Ubuntu build with R-devel failed to build the vignette gsDesign2.Rmd:

* creating vignettes ... ERROR
Error: --- re-buildinggsDesign2.Rmdusing rmarkdown
Quitting from gsDesign2.Rmd:123-133 [unnamed-chunk-5]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `[.data.table`:
! attempt access index 6/6 in VECTOR_ELT
---
Backtrace:1. └─gsDesign2::fixed_design_ahr(...)
 2.   └─gsDesign2::gs_design_ahr(...) at gsDesign2/R/fixed_design_ahr.R:114:5
 3.     └─gsDesign2::gs_info_ahr(...) at gsDesign2/R/gs_design_ahr.R:228:3
 4.       ├─dplyr::select(...) at gsDesign2/R/gs_info_ahr.R:126:5
 5.       └─gsDesign2::ahr(...) at gsDesign2/R/gs_info_ahr.R:126:5
 6.         └─gsDesign2::pw_info(...) at gsDesign2/R/ahr.R:108:3
 7.           ├─tbl_event[, `:=`(info0, event * q_c * q_e), by = .(time)] at gsDesign2/R/pw_info.R:170:3
 8.           └─data.table:::`[.data.table`(...) at gsDesign2/R/pw_info.R:170:3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: Error: processing vignette 'gsDesign2.Rmd' failed with diagnostics:
attempt access index 6/6 in VECTOR_ELT
--- failed re-buildinggsDesign2.RmdSUMMARY: processing the following file failed:gsDesign2.RmdError: Error: Vignette re-building failed.

The line that caused the failure hasn't been updated recently (nor has the surrounding code):

tbl_event[, info0 := event * q_c * q_e, by = .(time)]

@jdblischak
Copy link
Collaborator

Both the macOS and Ubuntu builds passed on restart


# Prepare the columns decimals ----
default_decimals <- c(NA, NA, 2, if (method != "combo") 4, 4, 4, 4)
default_decimals <- c(NA, NA, 2, if (method != "combo") 4, 4, 4, 4, 4)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this extra 4 needs to be removed. IIUC it is optionally added below if display_spending_time is TRUE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save spending time and output it

3 participants