Skip to content

Commit ba09258

Browse files
committed
last updates for 1.7.0 release
1 parent 1007f0b commit ba09258

File tree

17 files changed

+59
-35
lines changed

17 files changed

+59
-35
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ LICENSE2
2929
^\.github$
3030
^codecov\.yml$
3131
^CRAN-SUBMISSION$
32+
cran-comments.md

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Description: Provides generators for a high number of both single- and multi-
66
(numerical) optimization algorithms. Moreover, it offers a set of convenient
77
functions to generate, plot and work with objective functions.
88
Version: 1.7.0
9-
Date: 2023-10-26
9+
Date: 2026-02-23
1010
Authors@R: c(
1111
person(
1212
given = "Jakob",
@@ -35,7 +35,7 @@ Depends:
3535
checkmate (>= 1.1)
3636
Imports:
3737
BBmisc (>= 1.6),
38-
ggplot2 (>= 2.2.1),
38+
ggplot2 (>= 3.0.0),
3939
Rcpp (>= 0.11.0),
4040
Suggests:
4141
testthat,

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ S3method(hasOtherConstraints,smoof_wrapped_function)
5353
S3method(hasTags,character)
5454
S3method(hasTags,smoof_function)
5555
S3method(hasTags,smoof_generator)
56+
S3method(hasTags,smoof_wrapped_function)
5657
S3method(isMultiobjective,smoof_function)
5758
S3method(isMultiobjective,smoof_wrapped_function)
5859
S3method(isNoisy,smoof_function)

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ smoof 1.7.0
99
* Added support for single- and multi-objective NK-landscapes
1010
* Sanity checks for smoof functions evaluations are now optional (you may set the option smoof.check_input_before_evaluation
1111
to FALSE in order to deactivate those checks). This can lead to significant speed ups when a function is evaluated many times
12+
* Fixed some documentation issues
1213

1314
smoof 1.6.0.3
1415
=============

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
* Fixed bug in getLoggedValues when logging of x-values was set to FALSE in addLoggingWrapper
1414
* Fixed bug with instance ID mapping in makeBiObjBBOBFunction
15+
* Fixed some documentation issues
1516

1617
# smoof 1.6.0.3
1718

R/hasTags.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ hasTags.character = function(fn, tags) {
3939
return(hasTags(generator, tags))
4040
}
4141

42+
#' @export
4243
hasTags.smoof_wrapped_function = function(fn, tags) {
4344
return(hasTags(getWrappedFunction(fn), tags))
4445
}

R/plot.autoplot.R

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,13 @@
140140
}
141141

142142
if (n.numeric == 1L) {
143-
pl = ggplot2::ggplot(grid, ggplot2::aes_string(x = par.names[numeric.idx], y = "y")) + geom_line()
143+
num.par = par.names[numeric.idx]
144+
pl = ggplot2::ggplot(grid, ggplot2::aes(x = .data[[num.par]], y = .data[["y"]])) + geom_line()
144145
}
145146
if (n.numeric == 2L) {
146-
pl = ggplot2::ggplot(grid, ggplot2::aes_string(x = par.names[numeric.idx[1L]], y = par.names[numeric.idx[2L]]))
147+
num.par1 = par.names[numeric.idx[1L]]
148+
num.par2 = par.names[numeric.idx[2L]]
149+
pl = ggplot2::ggplot(grid, ggplot2::aes(x = .data[[num.par1]], y = .data[[num.par2]]))
147150
if (render.levels) {
148151

149152
if (!requireNamespace("RColorBrewer", quietly = TRUE))
@@ -152,11 +155,11 @@
152155
# see http://learnr.wordpress.com/2009/07/20/ggplot2-version-of-figures-in-lattice-multivariate-data-visualization-with-r-part-6/
153156
brewer.div = colorRampPalette(RColorBrewer::brewer.pal(11, "Spectral"), interpolate = "spline")
154157

155-
pl = pl + ggplot2::geom_raster(ggplot2::aes_string(fill = "y"))
158+
pl = pl + ggplot2::geom_raster(ggplot2::aes(fill = .data[["y"]]))
156159
pl = pl + ggplot2::scale_fill_gradientn(colours = brewer.div(200))
157160
}
158161
if (render.contours) {
159-
pl = pl + ggplot2::stat_contour(ggplot2::aes_string(z = "y"), colour = "gray", alpha = 0.8)
162+
pl = pl + ggplot2::stat_contour(ggplot2::aes(z = .data[["y"]]), colour = "gray", alpha = 0.8)
160163
}
161164
}
162165

@@ -181,11 +184,14 @@
181184
# get optima coordinates in a nice data.frame
182185
opt.df = getOptimaDf(x)
183186
if (n.numeric == 1L) {
184-
pl = pl + ggplot2::geom_point(opt.df, mapping = ggplot2::aes_string(x = par.names[numeric.idx[1L]], y = "y", colour = "optima", shape = "optima"))
187+
num.par1 = par.names[numeric.idx[1L]]
188+
pl = pl + ggplot2::geom_point(opt.df, mapping = ggplot2::aes(x = .data[[num.par1]], y = .data[["y"]], colour = .data[["optima"]], shape = .data[["optima"]]))
185189
} else {
186-
pl = pl + ggplot2::geom_point(opt.df, mapping = ggplot2::aes_string(x = par.names[numeric.idx[1L]], y = par.names[numeric.idx[2L]], colour = "optima", shape = "optima"))
190+
num.par1 = par.names[numeric.idx[1L]]
191+
num.par2 = par.names[numeric.idx[2L]]
192+
pl = pl + ggplot2::geom_point(opt.df, mapping = ggplot2::aes(x = .data[[num.par1]], y = .data[[num.par2]], colour = .data[["optima"]], shape = .data[["optima"]]))
187193
# opt.df$y = round(opt.df$y, digits = 2L)
188-
# pl = pl + geom_text(opt.df, mapping = aes_string(x = par.names[numeric.idx[1L]], y = par.names[numeric.idx[2L]], label = "y"))
194+
# pl = pl + geom_text(opt.df, mapping = aes(x = par.names[numeric.idx[1L]], y = par.names[numeric.idx[2L]], label = "y"))
189195
}
190196
}
191197

R/smoof.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,5 @@
4646
#' TR15-2-001, TU Dortmund University, 2015.
4747
#'
4848
#' @encoding UTF-8
49-
#' @docType package
50-
#' @name smoof-package
51-
NULL
49+
#' @keywords internal
50+
"_PACKAGE"

R/visualizeParetoOptimalFront.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ visualizeParetoOptimalFront = function(fn, ...) {
4848
eff.points = as.data.frame(eff.points)
4949
colnames(eff.points) = c("f1", "f2")
5050

51-
pl = ggplot2::ggplot(eff.points, mapping = ggplot2::aes_string(x = "f1", y = "f2"))
51+
pl = ggplot2::ggplot(eff.points, mapping = ggplot2::aes(x = .data[["f1"]], y = .data[["f2"]]))
5252
pl = pl + ggplot2::geom_line(colour = "darkgray")
5353
pl = pl + ggplot2::xlab(expression(f[1])) + ggplot2::ylab(expression(f[2]))
5454
pl = pl + ggplot2::ggtitle(sprintf("Objective space with shape of Pareto-optimal\n

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ The [ecr](https://github.com/jakobbossek/ecr2) package for evolutionary computin
6161

6262
## Citation
6363

64-
Please cite my [R Journal paper](https://journal.r-project.org/archive/2017/RJ-2017-004/index.html) in publications. Get the information via `citation("smoof")` or use the following BibTex entry:
64+
Please cite my [R Journal paper](https://journal.r-project.org/articles/RJ-2017-004/index.html) in publications. Get the information via `citation("smoof")` or use the following BibTex entry:
6565
```
6666
@Article{,
6767
author = {Jakob Bossek},
6868
title = {smoof: Single- and Multi-Objective Optimization Test Functions},
6969
year = {2017},
7070
journal = {The R Journal},
71-
url = {https://journal.r-project.org/archive/2017/RJ-2017-004/index.html},
71+
url = {https://journal.r-project.org/articles/RJ-2017-004/index.html},
7272
}
7373
```
7474

0 commit comments

Comments
 (0)