Skip to content

Commit

Permalink
R/eaf.R(eafplot.default): Return attsurfs invisibly.
Browse files Browse the repository at this point in the history
  • Loading branch information
MLopez-Ibanez committed Oct 29, 2021
1 parent 4d3e439 commit 13af633
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# eaf 2.3

* `eafplot()` now returns the attainment surfaces computed invisibly.

# eaf 2.2

Expand Down
8 changes: 5 additions & 3 deletions R/eaf.R
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ eafplot <- function(x, ...) UseMethod("eafplot")
#'
#' @param ... Other graphical parameters to [plot.default()].
#'
#' @return No value is returned.
#' @return Return (invisibly) the attainment surfaces computed.
#'
#' @seealso [read_datasets()] [eafdiffplot()]
#'
Expand All @@ -623,7 +623,9 @@ eafplot <- function(x, ...) UseMethod("eafplot")
#' A1 <- read_datasets(file.path(extdata_path, "ALG_1_dat.xz"))
#' A2 <- read_datasets(file.path(extdata_path, "ALG_2_dat.xz"))
#' eafplot(A1, percentiles = 50, sci.notation = TRUE)
#' eafplot(list(A1 = A1, A2 = A2), percentiles = 50)
#' # The attainment surfaces are returned invisibly.
#' attsurfs <- eafplot(list(A1 = A1, A2 = A2), percentiles = 50)
#' str(attsurfs)
#'
#' ## Save as a PDF file.
#' # dev.copy2pdf(file = "eaf.pdf", onefile = TRUE, width = 5, height = 4)
Expand Down Expand Up @@ -883,7 +885,7 @@ eafplot.default <-
}

box()
invisible()
invisible(attsurfs)
}

prettySciNotation <- function(x, digits = 1L)
Expand Down
6 changes: 4 additions & 2 deletions man/eafplot.Rd

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

0 comments on commit 13af633

Please sign in to comment.