Skip to content
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

Move function to internal #261

Merged
merged 14 commits into from
Jul 18, 2023
Merged

Move function to internal #261

merged 14 commits into from
Jul 18, 2023

Conversation

elong0527
Copy link
Collaborator

#256 move function back to internal

  • h1
  • hupdate
  • gridpts

- h1
- hupdate
- gridpts
@@ -81,39 +81,6 @@
#' @importFrom stats qnorm
#'
#' @export
#'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am a little concerned that if it is okay to delete the examples of gs_spending_bound, considering it is an exported function,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Many refer people to the vignettes?

Or we should create examples without h1() function

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we only show the 1st analysis bound, then we can get rid of h1. Otherwise, if we show the 2nd analysis bound, then we need h1. I personally feel the 2nd analysis is necessary... for the presentation of a comprehensive story.

I am open to referring people to vignettes in @examples, and will defer to @nanxstats for his suggestions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Decision: change the examples in gs_spending_bound as we have in gs_design_ahr.

@nanxstats
Copy link
Collaborator

@elong0527 @LittleBeannie This brings two great product decisions to make in the team meeting:

  1. Do we want to convert h1(), hupdate(), gridpts() to internal functions.
  2. Do we want to keeping the gs_spending_bound() example that shows the usage of h1().

They CAN be independent decisions and don't affect the other - because I can tell you a trick to use an internal function without involving the three colons:

h1 <- getFromNamespace("h1", ns = "gsDesign2")

Although this should only be used sparingly.

Copy link
Collaborator

@LittleBeannie LittleBeannie left a comment

Choose a reason for hiding this comment

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

Hi Yilong, thanks for working on this important PR. I have a discussion with Nan and Keaven this Friday, and we agree that it is okay to keep gridpts, h1 and hupdate un-exported. But we do need @examples for gs_spending_bound, considering it is an exported function.

As Keaven suggested, an example like gs_design_ahr(..., upper = gs_spending_bound, upar = ...) is a good one, because it shows the key usage of gs_spending_bound.

Could you please update the @examples in gs_spending_bound?

@@ -81,39 +81,6 @@
#' @importFrom stats qnorm
#'
#' @export
#'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Decision: change the examples in gs_spending_bound as we have in gs_design_ahr.

Merge branch 'main' of https://github.com/Merck/gsDesign2 into move-h1
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@fb-elong
Copy link

Examples are added.

@LittleBeannie
Copy link
Collaborator

I pushed another commit (4330455) to update the examples in gs_spending_bound following Keaven's suggestions. Please take a look and check if it works for you.

@elong0527
Copy link
Collaborator Author

I pushed another commit (4330455) to update the examples in gs_spending_bound following Keaven's suggestions. Please take a look and check if it works for you.

Looks good. Thanks!

@LittleBeannie LittleBeannie merged commit 97f7525 into main Jul 18, 2023
8 checks passed
@LittleBeannie LittleBeannie deleted the move-h1 branch July 18, 2023 14:32
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.

4 participants