Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generic function signatures so they match. #23

Merged
merged 5 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Description: Peter Henderson's Functional Geometry in R.
License: MIT + file LICENSE
Imports:
grid
RoxygenNote: 5.0.1
RoxygenNote: 7.2.3
URL: https://github.com/mhenderson/funcgeo
BugReports: https://github.com/mhenderson/funcgeo/issues
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
6 changes: 3 additions & 3 deletions R/flip.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' Flip a picture.
#'
#' @param picture A picture
#' @param g A picture
#' @return Flipped picture
#' @export
flip <- function(picture, ...) {
UseMethod("flip", picture)
flip <- function(g) {
UseMethod("flip", g)
}
7 changes: 4 additions & 3 deletions R/plot-picture.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#' plot.picture
#'
#' @param picture A picture
#' @param x A picture
#' @param ... Anything else.
#' @return grid.draw(picture)
#' @export
plot.picture <- function(picture) {
grid::grid.draw(picture)
plot.picture <- function(x, ...) {
grid::grid.draw(x)
}
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
7 changes: 4 additions & 3 deletions 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 g A picture
#' @param angle An angle
#' @return Rotated picture
#' @export
rot <- function(picture, ...) {
UseMethod("rot", picture)
rot <- function(g, angle) {
UseMethod("rot", g)
}
9 changes: 7 additions & 2 deletions man/above.Rd

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

3 changes: 2 additions & 1 deletion man/above.grob.Rd

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

13 changes: 10 additions & 3 deletions man/beside.Rd

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

9 changes: 7 additions & 2 deletions man/beside.grob.Rd

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

5 changes: 2 additions & 3 deletions man/cycle.Rd

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

5 changes: 2 additions & 3 deletions man/flip.Rd

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

1 change: 0 additions & 1 deletion man/flip.grob.Rd

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

1 change: 0 additions & 1 deletion man/nonet.Rd

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

7 changes: 4 additions & 3 deletions man/plot.picture.Rd

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

1 change: 0 additions & 1 deletion man/quartet.Rd

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

7 changes: 4 additions & 3 deletions man/rot.Rd

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

3 changes: 2 additions & 1 deletion man/rot.grob.Rd

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