-
Notifications
You must be signed in to change notification settings - Fork 8
Update the R functions to allow outputting spending time #602
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
base: main
Are you sure you want to change the base?
Conversation
- update `gs_design_ahr` to output spending time - update `summary` with a new argument to allow outputting spending time or not - update `as_gt`
jdblischak
left a comment
There was a problem hiding this 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
|
The macOS build failed during the setup due to a known temporary problem (yihui/litedown#112). I restarted the build. |
|
The Ubuntu build with R-devel failed to build the vignette * creating vignettes ... ERROR
Error: --- re-building ‘gsDesign2.Rmd’ using 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-building ‘gsDesign2.Rmd’
SUMMARY: processing the following file failed:
‘gsDesign2.Rmd’
Error: Error: Vignette re-building failed.The line that caused the failure hasn't been updated recently (nor has the surrounding code): Line 170 in ae1ed90
|
|
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) |
There was a problem hiding this comment.
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
gs_design_ahrto output spending timesummarywith a new argumentdisplay_spending_timeto allow outputting spending time or not (default isFALSE)as_gt