Skip to content

Commit 0768a74

Browse files
committed
Fix CRAN team comments. Add lty parameter to plot. Update website to Boostrap 5.
1 parent e5c63ba commit 0768a74

File tree

8 files changed

+43
-18
lines changed

8 files changed

+43
-18
lines changed

CRAN-SUBMISSION

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Version: 0.11.0
2+
Date: 2022-12-11 12:27:45 UTC
3+
SHA: e5c63baf599d025554042c1d19e9ad315574261c

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Authors@R: c(
1313
)
1414
Maintainer: Simon Garnier <[email protected]>
1515
Description: Splits data into Gaussian type clusters using the Cross-Entropy
16-
Clustering (CEC) method. This method allows for the simultaneous use of
17-
various type of Gaussian mixture models, for performing the reduction of
16+
Clustering ('CEC') method. This method allows for the simultaneous use of
17+
various types of Gaussian mixture models, for performing the reduction of
1818
unnecessary clusters, and for discovering new clusters by splitting them.
19-
CEC is based on the work of Spurek, P. and Tabor, J. (2014)
19+
'CEC' is based on the work of Spurek, P. and Tabor, J. (2014)
2020
<doi:10.1016/j.patcog.2014.03.006>.
2121
ByteCompile: true
2222
URL: https://github.com/swarm-lab/cec,

R/cec.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@
175175
#' m3[,2] <- m3[, 2] - 5
176176
#' m <- rbind(m1, m2, m3)
177177
#'
178-
#' oldpar <- graphics::par(ask = TRUE)
179-
#' on.exit(graphics::par(oldpar))
180178
#' plot(m, cex = 0.5, pch = 19)
181179
#'
182180
#' ## Clustering result:
@@ -452,8 +450,6 @@ cec.interactive <- function(x,
452450
keep.removed = FALSE,
453451
readline = TRUE) {
454452
old.ask <- graphics::par()["ask"]
455-
on.exit(graphics::par(old.ask))
456-
457453
n <- ncol(x)
458454

459455
if (n != 2) {
@@ -514,5 +510,6 @@ cec.interactive <- function(x,
514510
ignore <- readline(prompt = "Press <Enter>:")
515511
}
516512

513+
par(old.ask)
517514
Z
518515
}

R/plot.cec.R

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@
2424
#'
2525
#' @param pch.centers The same as \code{pch}, except that it applies only to the
2626
#' centers' means.
27-
#'
27+
#'
28+
#' @param ellipses If this parameter is TRUE, covariance ellipses will be drawn.
29+
#'
2830
#' @param ellipses.lwd The line width of the covariance ellipses. See \code{lwd}
2931
#' in \code{\link{par}} for more details.
30-
#'
31-
#' @param ellipses If this parameter is TRUE, covariance ellipses will be drawn.
32+
#'
33+
#' @param ellipses.lty The line type of the covariance ellipses. See \code{lty}
34+
#' in \code{\link{par}} for more details.
3235
#'
3336
#' @param model If this parameter is TRUE, the model (expected) covariance will
3437
#' be used for each cluster instead of the sample covariance (MLE) of the
@@ -52,8 +55,8 @@
5255
#'
5356
#' @export
5457
plot.cec <- function(x, col, cex = 0.5, pch = 19, cex.centers = 1,
55-
pch.centers = 8, ellipses.lwd = 4, ellipses = TRUE,
56-
model = TRUE, xlab, ylab, ...) {
58+
pch.centers = 8, ellipses = TRUE, ellipses.lwd = 4,
59+
ellipses.lty = 2, model = TRUE, xlab, ylab, ...) {
5760
if (ncol(x$data) != 2) {
5861
stop("Plotting is available only for 2-dimensional data.")
5962
}
@@ -96,7 +99,7 @@ plot.cec <- function(x, col, cex = 0.5, pch = 19, cex.centers = 1,
9699
tryCatch({
97100
cov <- covs[[i]]
98101
pts <- ellipse(means[i, ], cov)
99-
graphics::lines(pts, lwd = ellipses.lwd)
102+
graphics::lines(pts, lwd = ellipses.lwd, lty = ellipses.lty)
100103
},
101104
finally = {})
102105
}

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
url: https://swarm-lab.github.io/cec/
22

33
template:
4-
params:
4+
bootstrap: 5
55
bootswatch: simplex
66

77
authors:

cran-comments.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,26 @@ There are currently no downstream dependencies for this package.
3535

3636
## CRAN team comments
3737

38+
"Please always write package names, software names and API (application
39+
programming interface) names in single quotes in title and description.
40+
e.g: --> 'CEC'
41+
Please note that package names are case sensitive."
42+
43+
Fixed.
44+
45+
"Please do not use on.exit() to reset user's options(), working directory
46+
or par() after you changed it in examples and vignettes and demos. e.g.:
47+
man/cec.Rd
48+
Please reset in the following way
49+
e.g.:
50+
oldpar <- par(mfrow = c(1,2))
51+
...
52+
par(oldpar)"
53+
54+
Fixed.
55+
56+
---
57+
3858
The package appeared to have been "orphaned" and I am "adopting" it as new
3959
maintainer. CRAN check errors were not corrected for months, there has not been
4060
any activity on the package's GitHub repository in more than a year, and the

man/cec.Rd

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot.cec.Rd

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)