Skip to content

Commit

Permalink
Fix generic function signatures so they match.
Browse files Browse the repository at this point in the history
  • Loading branch information
MHenderson committed Mar 11, 2024
1 parent 03a2f0e commit 25102e6
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions R/above-grob.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#' Superimpose two grobs, one above the other.
#'
#' @param p A grob
#' @param q Another grob
#' @param m An integer
#' @param n Another integer
Expand Down
7 changes: 5 additions & 2 deletions R/above.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#' Superimpose two pictures, one above the other.
#'
#' @param p A picture
#' @param q Another picture
#' @param m An integer
#' @param n Another integer
#' @return A picture
#' @export
above <- function(picture, ...) {
UseMethod("above", picture)
above <- function(p, q, m, n) {
UseMethod("above")
}
5 changes: 4 additions & 1 deletion R/beside-grob.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#' Superimpose two grobs side-by-side.
#'
#' @param g grob
#' @param p grob
#' @param q grob
#' @param m An integer
#' @param n Another integer
#' @return A grob
#' @export
beside.grob <- function(p, q, m = 1, n = 1) {
Expand Down
10 changes: 7 additions & 3 deletions R/beside.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#' Superimpose two grobs, side-by-side.
#'
#' @param p A picture
#' @param p grob
#' @param q grob
#' @param m An integer
#' @param n Another integer
#' @return A grob
#' @return A picture
#' @export
beside <- function(picture, ...) {
UseMethod("beside", picture)
beside <- function(p, q, m = 1, n = 1) {
UseMethod("beside", p)
}
4 changes: 2 additions & 2 deletions R/cycle.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Cycle
#'
#' @param g grob
#' @return A grob
#' @param p A picture
#' @return A picture
#' @export
cycle <- function(p) {
return(quartet(p, rot(rot(rot(p))), rot(p), rot(rot(p))))
Expand Down
2 changes: 1 addition & 1 deletion R/flip.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#' @param picture A picture
#' @return Flipped picture
#' @export
flip <- function(picture, ...) {
flip <- function(picture) {
UseMethod("flip", picture)
}
1 change: 1 addition & 0 deletions R/rot-grob.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' Rotate a grob.
#'
#' @param g A grob
#' @param angle An angle
#' @return Rotated grob
#' @export
rot.grob <- function(g, angle = 90) {
Expand Down
3 changes: 2 additions & 1 deletion R/rot.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#' Rotate a picture.
#'
#' @param picture A picture
#' @param angle An angle
#' @return Rotated picture
#' @export
rot <- function(picture, ...) {
rot <- function(picture, angle) {
UseMethod("rot", picture)
}

0 comments on commit 25102e6

Please sign in to comment.