Skip to content

Commit ac2e384

Browse files
authored
Merge pull request #229 from Merck/foo-name
rename foo (#228)
2 parents 1afba2e + 654d288 commit ac2e384

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

R/expected_time.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ expected_time <- function(enroll_rate = tibble::tibble(
109109
# build a help function #
110110
# ----------------------------#
111111
# find the difference between `AHR()` and different values of total_duration
112-
foo <- function(x) {
112+
event_diff <- function(x) {
113113
ans <- ahr(
114114
enroll_rate = enroll_rate, fail_rate = fail_rate,
115115
total_duration = x, ratio = ratio
@@ -121,7 +121,7 @@ expected_time <- function(enroll_rate = tibble::tibble(
121121
# uniroot AHR() #
122122
# over total_duration #
123123
# ----------------------------#
124-
res <- try(uniroot(foo, interval))
124+
res <- try(uniroot(event_diff, interval))
125125

126126
if (inherits(res, "try-error")) {
127127
stop("expected_time(): solution not found!")

R/gs_design_combo.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ gs_design_combo <- function(enroll_rate = tibble(
192192
}
193193

194194
# Function to calculate power
195-
foo <- function(n, beta, ...) {
195+
get_combo_power <- function(n, beta, ...) {
196196
# Probability Cross Boundary
197197
prob <- gs_prob_combo(
198198
upper_bound = bound$upper,
@@ -227,7 +227,7 @@ gs_design_combo <- function(enroll_rate = tibble(
227227
)
228228

229229

230-
sample_size <- uniroot(foo, c(1, n_upper_bound), extendInt = "yes", beta = beta, ...)$root
230+
sample_size <- uniroot(get_combo_power, c(1, n_upper_bound), extendInt = "yes", beta = beta, ...)$root
231231
}
232232

233233
# Probability Cross Boundary

0 commit comments

Comments
 (0)