Skip to content

Commit

Permalink
Support spell_check
Browse files Browse the repository at this point in the history
  • Loading branch information
MLopez-Ibanez committed Nov 27, 2023
1 parent 2163396 commit 66b8529
Show file tree
Hide file tree
Showing 16 changed files with 94 additions and 41 deletions.
11 changes: 7 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ Imports:
grDevices,
matrixStats,
Rdpack
Suggests: extrafont,
testthat (>= 3.0.0),
withr,
viridisLite
Suggests:
extrafont,
testthat (>= 3.0.0),
withr,
viridisLite,
spelling
License: GPL (>= 2)
BugReports: https://github.com/MLopez-Ibanez/eaf/issues
URL: https://mlopez-ibanez.github.io/eaf/, https://github.com/MLopez-Ibanez/eaf
Expand All @@ -33,3 +35,4 @@ Roxygen: list(markdown = TRUE)
SystemRequirements: GNU make, Gnu Scientific Library
RdMacros: Rdpack
Config/testthat/edition: 3
Language: en-GB
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ releasebuild: clean
cd $(BINDIR) && R CMD build $(PACKAGEDIR) && tar -atvf $(PACKAGE)_$(PACKAGEVERSION).tar.gz

releasecheck: cran
$(Reval) 'devtools::spell_check()'
$(Reval) 'urlchecker::url_check()'
$(MAKE) winbuild
$(MAKE) macbuild
$(MAKE) winbuild #$(MAKE) macbuild

cran : build
cd $(BINDIR) && _R_CHECK_FORCE_SUGGESTS_=false _R_OPTIONS_STRINGS_AS_FACTORS_=false R CMD check --as-cran $(PACKAGE)_$(PACKAGEVERSION).tar.gz
Expand Down Expand Up @@ -144,8 +144,9 @@ submit:
remotecran: releasebuild
$(Reval) "rhub::check_for_cran($(RHUB_COMMON_ARGS), show_status = TRUE)"

macbuild: releasebuild
$(Reval) "rhub::check(platform='macos-highsierra-release-cran', $(RHUB_COMMON_ARGS))"
# Stopped working
# macbuild: releasebuild
# $(Reval) "rhub::check(platform='macos-highsierra-release-cran', $(RHUB_COMMON_ARGS))"

winbuild: releasebuild
$(Reval) "devtools::check_win_release()"
Expand Down
28 changes: 14 additions & 14 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

# eaf 1.06

* Fix bug when automatically generating a legend in eafplot with the
* Fix bug when automatically generating a legend in `eafplot()` with the
formula interface (Thanks to Bernd Bischl for reporting this)

* Improve handling of various newline character formats.
Expand All @@ -132,7 +132,7 @@

* `eafdiff.pl`: Mention option `--legendpos=none` to hide the legend.

* eafplot.pl: Add options `--maximise` and `--xmaximise` and `--colors=`.
* `eafplot.pl`: Add options `--maximise` and `--xmaximise` and `--colors=`.
Fix bug with `--area`.

* `eafplot.default()` now requires two colors when `type=="area"` and a
Expand All @@ -150,40 +150,40 @@

* Attempt to deal with DOS/Unix newlines correctly.

* eafplot.pl: Cleanups.
* `eafplot.pl`: Cleanups.
(`--single, --output, --legend`): New options.
Default to PDF.

* eafdiff.pl: Many cleanups.
* `eafdiff.pl`: Many cleanups.
EAF diff with `type="area"` is the default now.
Parameter `--cex` replaced by `--scale`.
Do not require ps2eps.
Handle `--obj1=` better. Crop pdf before converting to png.
Do not require `ps2eps`.
Handle `--obj1=` better. Crop pdf before converting to `PNG`.
(`--noattsurfs`): New option.
(`--output-dir,--output`): New options.
(`--eps`): New option. PDF is the default now.

* Force eafdiff plots to use a square plotting region.
* Force `eafdiffplot()` to use a square plotting region.

* `read.data.sets()` normalizes paths, thus it works with files such as ~/file.
* `read.data.sets()` normalizes paths, thus it works with files such as `~/file`.

* Function `eafdiffplot()` handles `percentiles=NA` and grand.lines
parameter.

* Fix bug with ranges and `maximise=TRUE` in `eafdiffplot()`.

* Fix points.steps to work correctly for all values of maximise.
* Fix `points.steps` to work correctly for all values of `maximise`.

* Fix bug in `eafdiffplot(..., maximise=c(TRUE,FALSE), full.eaf = TRUE)`

* Fix `"log"` parameter in eafplot and eafdiffplot.
* Fix `"log"` parameter in `eafplot()` and `eafdiffplot()`.

* Avoid that `eafplot.formula` modifies global options.

* Add `'axes'` parameter to eafplot.
* Add `'axes'` parameter to `eafplot()`.

* To avoid confusion, the arguments `'xaxis.side'` and `'yaxis.side'` of
eafplot can only take values `c("below", "above")` and `c("left",
`eafplot()` can only take values `c("below", "above")` and `c("left",
"right")`, respectively.

* Add missing Makefile in `inst/scripts/eaf/`.
Expand All @@ -194,10 +194,10 @@

# eaf 1.03

* Handle maximise argument in eafdiffplot and `--maximise` command-line
* Handle maximise argument in `eafdiffplot()` and `--maximise` command-line
option in `eafdiff.pl`

* R/calls.R (eafplot.data.frame): Fix problem with main parameter.
* `R/calls.R` (`eafplot.data.frame`): Fix problem with main parameter.

# eaf 1.00

Expand Down
2 changes: 1 addition & 1 deletion R/eaf.R
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ points.steps <- function(x)
#' point. If groups is not `NULL`, then an additional column
#' indicates to which group the point belongs.
#'
#' @author Manuel \enc{López-Ibáñez}{Lopez-Ibanez}
#' @author Manuel López-Ibáñez
#'
#'@note There are several examples of data sets in `system.file(package="eaf","extdata")`. The current implementation only supports two and three dimensional points.
#'
Expand Down
14 changes: 7 additions & 7 deletions R/eafplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
#' attainment surfaces for certain percentiles or as points.
#'
#' This function can be used to plot random sets of points like those obtained
#' by different runs of biobjective stochastic optimization algorithms. An EAF
#' by different runs of biobjective stochastic optimisation algorithms. An EAF
#' curve represents the boundary separating points that are known to be
#' attainable (that is, dominated in Pareto sense) in at least a fraction
#' (quantile) of the runs from those that are not. The median EAF represents
#' the curve where the fraction of attainable points is 50%. In single
#' objective optimization the function can be used to plot the profile of
#' objective optimisation the function can be used to plot the profile of
#' solution quality over time of a collection of runs of a stochastic optimizer.
#'
#' @param x Either a matrix of data values, or a data frame, or a list of
#' data frames of exactly three columns.
#'
#' @concept eafviz
#' @concept visualisation
#' @export
eafplot <- function(x, ...) UseMethod("eafplot")

Expand Down Expand Up @@ -124,7 +124,7 @@ eafplot <- function(x, ...) UseMethod("eafplot")
#' las = 1, log = "y", main = "SPEA2 (Richmond)",
#' legend.pos = "bottomright")
#' }
#' @concept eafviz
#' @concept visualisation
#' @export
eafplot.default <-
function (x, sets = NULL, groups = NULL,
Expand Down Expand Up @@ -681,7 +681,7 @@ plot.eafdiff.side <- function (eafdiff, attsurfs = list(),
#' # file = "wrots_l100w10_dat-wrots_l10w100_dat-diff.txt",
#' # quote = FALSE, row.names = FALSE, col.names = FALSE)
#'
#' @concept eafviz
#' @concept visualisation
#'@export
eafdiffplot <-
function(data.left, data.right,
Expand Down Expand Up @@ -891,7 +891,7 @@ seq.intervals.labels <- function(s, first.open = FALSE, last.open = FALSE,
#'
#'@param data Dataframe containing the fields mentioned in the formula and in groups.
#'@export
#'@concept eafviz
#'@concept visualisation
eafplot.formula <- function(formula, data, groups = NULL, subset = NULL, ...)
{
## formula of type time+cost~run|inst, groups=alg
Expand Down Expand Up @@ -969,7 +969,7 @@ eafplot.formula <- function(formula, data, groups = NULL, subset = NULL, ...)
#' @describeIn eafplot List interface for lists of data.frames or matrices
#'
#'@export
#'@concept eafviz
#'@concept visualisation
eafplot.list <- function(x, ...)
{
if (!is.list(x))
Expand Down
2 changes: 1 addition & 1 deletion R/interactive.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#'
#'@references
#' \insertAllCited{}
#' @concept eafviz
#' @concept visualisation
#' @export
choose_eafdiffplot <- function(data.left, data.right, intervals = 5,
maximise = c(FALSE, FALSE),
Expand Down
2 changes: 1 addition & 1 deletion R/read_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ read.data.sets <- function(file, col.names)
#' @param x The data set to write. The last column must be the set number.
#'
#' @param file either a character string naming a file or a connection open for
#' writing. ‘""’ indicates output to the console.
#' writing. `""` indicates output to the console.
#'
#'@seealso \code{\link[utils]{write.table}}, [read_datasets()]
#'
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Dear CRAN maintainers,

I would like to submit a new version of the 'eaf' package to CRAN.

This fixes a -Wuse-after-free warning reported by Prof Brian Ripley.
This fixes several warnings reported by CRAN.

Regarding this NOTE:

Expand Down
46 changes: 46 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Bartz
Beielstein
Biobjective
Bischl
Cleanups
Codecov
Coloring
DIMACS
EAFs
GD
GPs
Hausdorff
Hypervolume
IGD
IGDX
IRIDIA
Ibáñez
López
Metaheuristics
Mickael
Molchanov
ORCID
Preuss
Quemy
Roxygen
SPEA
TR
Tabu
TabuCol
TinyTeX
Vanzyl's
Vorob'ev
behavior
behaviors
bibtex
biobjective
cleanups
color
colormap
colors
doi
favor
hypervolume
libre
metaheuristic
nondominated
2 changes: 1 addition & 1 deletion man/choose_eafdiffplot.Rd

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

2 changes: 1 addition & 1 deletion man/eafdiffplot.Rd

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

6 changes: 3 additions & 3 deletions man/eafplot.Rd

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

2 changes: 1 addition & 1 deletion man/eafs.Rd

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

2 changes: 1 addition & 1 deletion man/write_datasets.Rd

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

2 changes: 1 addition & 1 deletion pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ reference:
- has_concept("eaf")
- title: Visualizing the Empirical Attainment Function
contents:
- has_concept("eafviz")
- has_concept("visualisation")
- symDifPlot
- title: Pareto dominance
contents: has_concept("dominance")
Expand Down
3 changes: 3 additions & 0 deletions tests/spelling.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(requireNamespace('spelling', quietly = TRUE))
spelling::spell_check_test(vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE)

0 comments on commit 66b8529

Please sign in to comment.