-
Notifications
You must be signed in to change notification settings - Fork 8
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
Refactor as_rtf()
#450
Merged
+248
−581
Merged
Refactor as_rtf()
#450
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
d01df19
tweak error message
yihui 5485aec
remove the redundant paste0() call: paste(collapse = ' | ') will jus…
yihui 1a0da68
introduce the %||% operator
yihui fc0d3e1
merge the two assignments
yihui 52a5165
"weld" the few short pipes into one expression
yihui cb14c1b
factor out the code to generate the default title and footnote to be …
yihui 4c92673
an alternative way to find the method
yihui 5e493b5
perhaps we should use `colname_spannersub[2]` as in `as_gt()`, instea…
yihui 6dd6164
copy from as_gt()
yihui becd0e0
copying from as_gt(): the argument `display_inf_bound` was not actual…
yihui 642e498
rename design_method() to fixed_design_method()
yihui e271130
factor out gs_design_method()
yihui c2c640e
copy from as_gt() (will see how to refactor the code later)
yihui 26c3d2b
copy from as_rtf.fixed_design()
yihui 6b34090
use %||%
yihui 98c0bca
2:length is equivalent to -1 (well, assuming length >= 2)
yihui 680fc01
simplify these border variables a little bit
yihui ee5387a
intToUtf8() sounds like an overkill; we can simply index the `letters…
yihui 709bc05
factor out the row/column indices to make [] thinner
yihui a16e25c
I don't think `footnotes` can be NULL
yihui f705696
this element should be hard-coded as `"Null hypothesis"` (otherwise i…
yihui bb3397a
factor out more strings into footnote_content()
yihui b0fb333
reuse footnote_content() and eliminate line breaks (which don't matte…
yihui 73370df
amend c2c640e5306ed5e9c4002f14ac6c68ef2ac91d11: factor out the defaul…
yihui 9c7308a
it may be more readable without using a closure from local()
yihui ebfb904
rename `method_title` to `fixed_method_title`, and add `gs_method_tit…
yihui 7899504
factor out the code to get/transform `display_columns`
yihui 0da4be1
shorten function names
yihui b5ba260
make this function a one-liner based on the fact that an assignment w…
yihui 584f485
cosmetic changes
yihui 4e321d2
factor out the code to add footnotes and write RTF
yihui 998ef29
delete an extra space (nobody has discovered this before? unbelievable)
yihui bd00877
factor out the code to check the `col_rel_width`
yihui 247b00e
factor out more common code from as_gt.gs_design() and as_rtf.gs_desi…
yihui 476a635
collect footnotes using c() and concatenate all with paste(..., colla…
yihui ac4a83d
move the logic `inherits('non_binding') & x_alpha < full_alpha` into …
yihui 49b23a9
factor out `substr(Analysis, 1, 11) == 'Analysis: N'`, which is poten…
yihui 9522d70
the functions `gs_[sub]title` are simple enough and not used elsewher…
yihui a598ec6
use the processed `x` from `info` so that the length of `footnote_row…
yihui 3654e0f
bump version
yihui 5397198
more comments
yihui 954a226
misplaced ) [ci skip]
yihui d353d81
Merge branch 'main' into as_rtf_tweaks
yihui 12cec74
renaming using the prefixes `fd_` and `gsd_`
yihui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: gsDesign2 | ||
Title: Group Sequential Design with Non-Constant Effect | ||
Version: 1.1.2.20 | ||
Version: 1.1.2.21 | ||
Authors@R: c( | ||
person("Keaven", "Anderson", email = "[email protected]", role = c("aut")), | ||
person("Yilong", "Zhang", email = "[email protected]", role = c("aut")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@LittleBeannie I have a question regarding a difference between
as_gt()
andas_rtf()
that I noticed while comparing the two: foras_gt()
, we obtainfull_alpha
from the attribute ofx
, whereas foras_rtf()
,full_alpha
is its argument and not retrieved fromx
's attributes. Is this expected? I'm not sure if you or @elong0527 is the right person to ask.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.
Hi @yihui , yes, I can answer the question. The
full_alpha
should be retrieved fromx
's attributes. I will prepare a PR to get it there.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.
If you want to do it, please wait until this PR is merged, or I can just do it in this PR.
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.
Thanks for the confirmation. I know there are many changes occurring in this pull request, so let's wait until this PR is merged.