Skip to content

Commit 4b28d04

Browse files
committed
address coding style issue
1 parent 255daaa commit 4b28d04

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

R/as_rtf.R

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
#' Create RTF file output from \code{\link{as_table}} to summarize
44
#' an object; currently only implemented for \code{\link{gsBinomialExact}}.
55
#'
6-
#' @param x Object to be display on rtf.
6+
#' @param x Object to be displayed on rtf.
77
#' @param ... Other parameters that may be specific the object.
88
#'
9-
#' @return NULL.
9+
#' @return RTF file for summary table.
1010
#'
1111
#' @seealso \code{vignette("binomialSPRTExample")}
1212
#'
@@ -27,7 +27,7 @@
2727
#' as_table() %>%
2828
#' as_rtf(
2929
#' title = "Power/Type I error and expected sample size for a group sequential design",
30-
#' rtf_path = tempfile(fileext = ".rtf")
30+
#' file = tempfile(fileext = ".rtf")
3131
#' )
3232
#'
3333
#' safety_design <- binomialSPRT(p0 = .04, p1 = .1, alpha = .04, beta = .2, minn = 4, maxn = 75)
@@ -44,7 +44,7 @@
4444
#' theta_label = "Underlying\nAE rate",
4545
#' prob_decimals = 3,
4646
#' bound_label = c("low rate", "high rate"),
47-
#' rtf_path = tempfile(fileext = ".rtf")
47+
#' file = tempfile(fileext = ".rtf")
4848
#' )
4949
as_rtf <- function(x, ...) UseMethod("as_rtf")
5050

@@ -60,7 +60,7 @@ as_rtf <- function(x, ...) UseMethod("as_rtf")
6060
#' @param en_decimals Number of decimal places for expected number of
6161
#' observations when bound is crossed or when trial ends without crossing.
6262
#' @param rr_decimals Number of decimal places for response rates.
63-
#' @param rtf_path Output path for the rtf file.
63+
#' @param file Output path for the rtf file.
6464
#'
6565
#' @importFrom r2rtf rtf_title rtf_colheader rtf_body rtf_encode write_rtf
6666
#'
@@ -76,7 +76,7 @@ as_rtf.gsBinomialExactTable <-
7676
prob_decimals = 2,
7777
en_decimals = 1,
7878
rr_decimals = 0,
79-
rtf_path,
79+
file,
8080
...) {
8181
x[,2] <- sprintf(paste0("%.", prob_decimals,"f"), unlist(x[,2]))
8282
x[,3] <- sprintf(paste0("%.", prob_decimals,"f"), unlist(x[,3]))
@@ -95,8 +95,8 @@ as_rtf.gsBinomialExactTable <-
9595
) %>%
9696
rtf_body() %>%
9797
rtf_encode() %>%
98-
write_rtf(rtf_path)
98+
write_rtf(file)
9999

100-
message("The RTF output is saved in", normalizePath(rtf_path))
100+
message("The RTF output is saved in", normalizePath(file))
101101

102102
}

man/as_rtf.Rd

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)