Skip to content

Commit

Permalink
Improve docs for the quartet function. (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
MHenderson committed Mar 29, 2024
1 parent 3fd5c36 commit a432a36
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
17 changes: 11 additions & 6 deletions R/quartet.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#' Quartet
#' Create a 2 by 2 grid pattern of pictures
#'
#' @param p A grob
#' @param q Another grob
#' @param r Yet another grob
#' @param s The last grob
#' @return A grob
#' `quartet` returns a 2 by 2 grid pattern made up of the four input `grid::grob`
#' pictures: `p`, `q`, `r` and `s`. In the final grid `p` is in the top-left
#' position, `q` is in the top-right position, `r` is in the bottom-left
#' position and `s` is in the top-right position.
#'
#' @param p A `grid::grob` for the top-left position
#' @param q A `grid::grob` for the top-right position
#' @param r A `grid::grob` for the bottom-left position
#' @param s A `grid::grob` for the bottom-right position
#' @return A `grid::grob` made up of the four input pictures arranged in a 2 by 2 grid pattern.
#' @export
quartet <- function(p, q, r, s) {
return(above(beside(p, q), beside(r, s)))
Expand Down
17 changes: 10 additions & 7 deletions man/quartet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a432a36

Please sign in to comment.