@@ -69,14 +69,9 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
6969 # ' be set in this order.
7070 # ' @description Reorders `teal_card` objects in `Reporter`.
7171 # ' @return `self`, invisibly.
72- # ' @examplesIf require("ggplot2")
73- # ' library(ggplot2)
72+ # ' @examplesIf require("ggplot2") && require("rtables")
7473 # ' library(rtables)
75- # '
76- # ' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
77- # ' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
78- # ' metadata(card1, "title") <- "Card1"
79- # '
74+ # ' # With the card1 from above
8075 # ' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
8176 # ' table_res2 <- build_table(lyt, airquality)
8277 # ' card2 <- teal_card(
@@ -101,24 +96,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
10196 # ' @param card The new object (`ReportCard` or `teal_card`) to replace the existing one.
10297 # ' @return `self`, invisibly.
10398 # ' @examplesIf require("ggplot2")
104- # ' library(ggplot2)
105- # ' library(rtables)
106- # '
107- # ' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
108- # ' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
109- # ' metadata(card1, "title") <- "Card1"
110- # '
111- # ' reporter <- Reporter$new()
112- # ' reporter$append_cards(list(card1))
113- # '
114- # ' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
115- # ' table_res2 <- build_table(lyt, airquality)
116- # ' card2 <- teal_card(
117- # ' "## Header 2 text",
118- # ' "A paragraph of default text",
119- # ' table_res2
120- # ' )
121- # ' metadata(card2, "title") <- "Card2"
99+ # ' # With card1 and card2 from above
122100 # '
123101 # ' metadata(reporter$get_cards()[[1]], "title")
124102 # ' reporter$replace_card(card2, names(reporter$get_cards())[[1]])
@@ -134,19 +112,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
134112 # ' @description Retrieves all `teal_card` objects contained in `Reporter`.
135113 # ' @return A (`list`) of [`teal_card`] objects.
136114 # ' @examplesIf require("ggplot2")
137- # ' library(ggplot2)
138- # ' library(rtables)
139- # '
140- # ' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
141- # ' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
142- # '
143- # ' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
144- # ' table_res2 <- build_table(lyt, airquality)
145- # ' card2 <- teal_card(
146- # ' "## Header 2 text",
147- # ' "A paragraph of default text",
148- # ' table_res2
149- # ' )
115+ # ' # With card1 and card2 from above
150116 # '
151117 # ' reporter <- Reporter$new()
152118 # ' reporter$append_cards(list(card1, card2))
@@ -167,19 +133,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
167133 # ' Default is a `\n\\newpage\n` markdown.
168134 # ' @return `list()` of `teal_card`
169135 # ' @examplesIf require("ggplot2")
170- # ' library(ggplot2)
171- # ' library(rtables)
172- # '
173- # ' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
174- # ' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
175- # '
176- # ' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
177- # ' table_res2 <- build_table(lyt, airquality)
178- # ' card2 <- teal_card(
179- # ' "## Header 2 text",
180- # ' "A paragraph of default text",
181- # ' table_res2
182- # ' )
136+ # ' # With card1 and card2 from above
183137 # '
184138 # ' reporter <- Reporter$new()
185139 # ' reporter$append_cards(list(card1, card2))
@@ -261,7 +215,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
261215 # ' reporter <- Reporter$new()
262216 # ' reporter$from_reporter(reporter)
263217 from_reporter = function (reporter ) {
264- lifecycle :: deprecate_warn(" 0.5.0.9000 " , " Reporter$from_reporter()" )
218+ lifecycle :: deprecate_warn(" 0.6.0 " , " Reporter$from_reporter()" )
265219 checkmate :: assert_class(reporter , " Reporter" )
266220 self $ reset()
267221 self $ append_cards(reporter $ get_cards())
0 commit comments