Skip to content

Commit 72ec0c8

Browse files
committed
resolve biocCheck
1 parent 44ad32c commit 72ec0c8

File tree

5 files changed

+50
-8
lines changed

5 files changed

+50
-8
lines changed

R/tidyprint_1_utlis.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ format_covariate_header <- function(separator_row, printed_colnames, covariate_n
153153
#' (`setup$body`).
154154
#' @param ... Unused; present for S3 method consistency.
155155
#'
156+
#' @return A character vector of header lines to be displayed above the table.
157+
#' (pillar prints the returned character; this function has no side effects
158+
#' beyond returning those lines.)
159+
#'
156160
#' @importFrom pillar tbl_format_header align style_subtle
157161
#' @importFrom cli col_br_blue col_br_black
158162
#' @importFrom stringr str_locate_all

R/tidyprint_message.R

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
#' Print styled tidyprint messages
1+
#' Print a styled tidyprint message
2+
#'
3+
#' Prints a message to the console with a consistent tidyomics style.
4+
#' A package-specific prefix is automatically added based on the calling
5+
#' package name, followed by the message text. Different message types
6+
#' are displayed using appropriate styles from the \pkg{cli} package.
27
#'
38
#' @param message A character string containing the message to display.
4-
#' @param type The type of message to display ("info", "success", "warning", "danger"). Defaults to "info".
9+
#' @param type The type of message to display. One of
10+
#' \code{"info"}, \code{"success"}, \code{"warning"}, or \code{"danger"}.
11+
#' Defaults to \code{"info"}.
12+
#'
13+
#' @return Invisibly returns \code{NULL}. Called for side effects (printing
14+
#' a styled message to the console).
15+
#'
516
#' @export
617
#' @examples
718
#' tidy_message("Loading data...", type = "info")
@@ -33,7 +44,14 @@ tidy_message <- function(message, type = c("info", "success", "warning", "danger
3344
style_fun("{prefix}: {message}")
3445
}
3546

36-
#' Test tidy_message function
47+
#' Demonstrate tidy_message usage
48+
#'
49+
#' Runs through examples of the [`tidy_message()`] function for all
50+
#' supported message types (`"info"`, `"success"`, `"warning"`, `"danger"`).
51+
#' Intended for demonstration and testing only.
52+
#'
53+
#' @return Invisibly returns `NULL`. Called for side effects (messages
54+
#' printed to the console).
3755
#' @export
3856
#' @examples
3957
#' demo_tidy_message()

man/demo_tidy_message.Rd

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/tbl_format_header.SE_print_abstraction.Rd

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/tidy_message.Rd

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)