Skip to content

Commit 7ccf3d9

Browse files
[skip style] [skip vbump] Restyle files
1 parent 0d686e3 commit 7ccf3d9

File tree

3 files changed

+41
-45
lines changed

3 files changed

+41
-45
lines changed

R/betadiff.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@
2929
#' @example examples/dbetadiff.R
3030
#' @export
3131
dbetadiff <- function(
32-
z,
33-
parY,
34-
parX,
35-
eps = .Machine$double.eps,
36-
rel.tol = .Machine$double.eps^0.1
37-
) {
32+
z,
33+
parY,
34+
parX,
35+
eps = .Machine$double.eps,
36+
rel.tol = .Machine$double.eps^0.1) {
3837
assert_numeric(
3938
z,
4039
min.len = 1,

R/ocRctPostprobDist.R

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,21 @@
1919
#' - `nControl` : mean of look size for Control arm.
2020
#' @keywords internal
2121
h_get_decisionDist_rct <- function(
22-
nnr,
23-
nnrE,
24-
nnrF,
25-
pE,
26-
pS,
27-
parE = c(1, 1),
28-
parS = c(1, 1),
29-
tL,
30-
tU,
31-
deltaE,
32-
deltaF,
33-
relativeDelta,
34-
randRatio = 1,
35-
Nmax,
36-
orig_nnr
37-
) {
22+
nnr,
23+
nnrE,
24+
nnrF,
25+
pE,
26+
pS,
27+
parE = c(1, 1),
28+
parS = c(1, 1),
29+
tL,
30+
tU,
31+
deltaE,
32+
deltaF,
33+
relativeDelta,
34+
randRatio = 1,
35+
Nmax,
36+
orig_nnr) {
3837
assert_numeric(nnr, finite = TRUE, any.missing = FALSE)
3938
assert_numeric(nnrE, max.len = length(nnr), any.missing = FALSE)
4039
assert_numeric(nnrF, max.len = length(nnr), any.missing = FALSE)
@@ -197,21 +196,20 @@ h_get_oc_rct <- function(all_sizes, Nmax, nActive, nControl, decision) {
197196
#' @example examples/ocRctPostprobDist.R
198197
#' @export
199198
ocRctPostprobDist <- function(
200-
nnE,
201-
pE,
202-
pS,
203-
deltaE,
204-
deltaF,
205-
relativeDelta = FALSE,
206-
tL,
207-
tU,
208-
parE,
209-
parS,
210-
randRatio = 1,
211-
sim,
212-
wiggle = FALSE,
213-
nnF = nnE
214-
) {
199+
nnE,
200+
pE,
201+
pS,
202+
deltaE,
203+
deltaF,
204+
relativeDelta = FALSE,
205+
tL,
206+
tU,
207+
parE,
208+
parS,
209+
randRatio = 1,
210+
sim,
211+
wiggle = FALSE,
212+
nnF = nnE) {
215213
assert_numeric(
216214
nnE,
217215
min.len = 1,

R/plotBeta.R

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ plotBeta <- function(alpha, beta) {
6363
#' @export
6464
#' @keywords graphics
6565
plotBetaDiff <- function(
66-
parX, # parameters of control or SOC
67-
parY, # parameters of experimental arm
68-
go_cut = 0.20, # a meaningful improvement threshold
69-
stop_cut = 0.1, # a poor improvement threshold
70-
shade = TRUE, # paint the two areas under the curve
71-
note = TRUE
72-
) {
66+
parX, # parameters of control or SOC
67+
parY, # parameters of experimental arm
68+
go_cut = 0.20, # a meaningful improvement threshold
69+
stop_cut = 0.1, # a poor improvement threshold
70+
shade = TRUE, # paint the two areas under the curve
71+
note = TRUE) {
7372
# show values of the colored area
7473
assert_numeric(parX, lower = 0, finite = TRUE, any.missing = FALSE)
7574
assert_numeric(parY, lower = 0, finite = TRUE, any.missing = FALSE)
@@ -102,7 +101,7 @@ plotBetaDiff <- function(
102101
stop_label
103102
)
104103

105-
pbetadiff_plot <- if (shade) {
104+
pbetadiff_plot <- if (shade) {
106105
ggplot2::ggplot(
107106
data = data,
108107
mapping = ggplot2::aes(x = grid, y = density)

0 commit comments

Comments
 (0)