Skip to content

Commit

Permalink
simplify extractors
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Dec 21, 2023
1 parent d598e75 commit f9ac60d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/extract-stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ extract_stats <- function(p, ...) {

#' @rdname extract_stats
#' @export
extract_subtitle <- function(p) extract_stats(p)$subtitle_data$expression[[1L]]
extract_subtitle <- function(p) purrr::pluck(extract_stats(p), "subtitle_data", "expression", 1L)

#' @rdname extract_stats
#' @export
extract_caption <- function(p) extract_stats(p)$caption_data$expression[[1L]]
extract_caption <- function(p) purrr::pluck(extract_stats(p), "caption_data", "expression", 1L)

0 comments on commit f9ac60d

Please sign in to comment.