Skip to content

Commit 32ca8ca

Browse files
authored
1.1.5 (#10)
* Drop C++11 requirement * Drop citEntry * Drop personList * Fix README
1 parent 7b01a98 commit 32ca8ca

File tree

11 files changed

+104
-128
lines changed

11 files changed

+104
-128
lines changed

CRAN-SUBMISSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Version: 1.1.4
2-
Date: 2022-11-07 19:22:17 UTC
3-
SHA: 08f5e6db576460ccb5249f795e2a8aac669f975b
1+
Version: 1.1.5
2+
Date: 2023-08-19 00:23:24 UTC
3+
SHA: 38368f4f9475e882c076efe63226f1ee0547fbfe

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: rotasym
22
Type: Package
33
Title: Tests for Rotational Symmetry on the Hypersphere
4-
Version: 1.1.4
5-
Date: 2022-11-07
4+
Version: 1.1.5
5+
Date: 2023-08-19
66
Authors@R: c(
77
person(given = "Eduardo", family = "García-Portugués",
88
role = c("aut", "cre"), email = "[email protected]",
@@ -28,5 +28,5 @@ LinkingTo: Rcpp, RcppArmadillo
2828
URL: https://github.com/egarpor/rotasym
2929
BugReports: https://github.com/egarpor/rotasym
3030
Encoding: UTF-8
31-
RoxygenNote: 7.2.0
31+
RoxygenNote: 7.2.3
3232
Roxygen: list(old_usage = TRUE)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@
5050
* Fix warning in r-devel-linux-x86_64-fedora-clang and r-devel-linux-x86_64-debian-clang.
5151
* Fix bug in `kde_level_set()` (example).
5252

53+
# rotasym 1.1.5
54+
55+
* Drop C++11 requirement to adhere to new CRAN policies.
56+
* Drop `personList()` and `citEntry()`.

README.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ set.seed(123456789)
7272
data_0 <- r_vMF(n = n, mu = theta, kappa = 1)
7373
```
7474

75-
### Specified-$\boldsymbol{\theta}$ case
75+
### Specified-θ case
7676

7777
```{r, specified}
7878
# theta known
@@ -81,7 +81,7 @@ test_rotasym(data = data_0, theta = theta, type = "loc_vMF")
8181
test_rotasym(data = data_0, theta = theta, type = "hyb_vMF")
8282
```
8383

84-
### Unspecified-$\boldsymbol{\theta}$ case
84+
### Unspecified-θ case
8585

8686
```{r, unspecified}
8787
# theta unknown (employs the spherical mean as estimator)
@@ -93,9 +93,9 @@ test_rotasym(data = data_0, type = "hyb_vMF")
9393
## Data application: test for the rotational symmetry of sunspots
9494

9595
The data application in García-Portugués, Paindaveine and Verdebout (2020) can
96-
be reproduced through the script [sunspots-births.R](https://github.com/egarpor/rotasym/blob/master/data-raw/sunspots-births.R) (data gathering and preprocessing) and the code snippet below.
96+
be replicated through the script [sunspots-births.R](https://github.com/egarpor/rotasym/blob/master/data-raw/sunspots-births.R) (data gathering and preprocessing) and the code snippet below.
9797

98-
```{r, sunspots_births}
98+
```{r, sunspots_births, fig.show = 'hold'}
9999
# Load data
100100
data("sunspots_births")
101101
sunspots_births$X <-

README.md

Lines changed: 70 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ GPLv3](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://www.gnu.org
55
[![R build
66
status](https://github.com/egarpor/rotasym/workflows/R-CMD-check/badge.svg)](https://github.com/egarpor/rotasym/actions)
77
[![](https://www.r-pkg.org/badges/version/rotasym?color=green)](https://cran.r-project.org/package=rotasym)
8-
[![](http://cranlogs.r-pkg.org/badges/grand-total/rotasym?color=green)](https://cran.r-project.org/package=rotasym)
9-
[![](http://cranlogs.r-pkg.org/badges/last-month/rotasym?color=green)](https://cran.r-project.org/package=rotasym)
8+
[![](http://cranlogs.r-pkg.org/badges/grand-total/rotasym)](https://cran.r-project.org/package=rotasym)
9+
[![](http://cranlogs.r-pkg.org/badges/last-month/rotasym)](https://cran.r-project.org/package=rotasym)
1010

1111
<!-- <img src="" alt="rotasym hexlogo" align="right" width="200" style="padding: 0 15px; float: right;"/> -->
1212

@@ -56,7 +56,7 @@ set.seed(123456789)
5656
data_0 <- r_vMF(n = n, mu = theta, kappa = 1)
5757
```
5858

59-
### Specified-**θ** case
59+
### Specified-θ case
6060

6161
``` r
6262
# theta known
@@ -80,7 +80,7 @@ test_rotasym(data = data_0, theta = theta, type = "hyb_vMF")
8080
#> Q_hyb_vMF = 46.329, df = 53, p-value = 0.7297
8181
```
8282

83-
### Unspecified-**θ** case
83+
### Unspecified-θ case
8484

8585
``` r
8686
# theta unknown (employs the spherical mean as estimator)
@@ -107,7 +107,7 @@ test_rotasym(data = data_0, type = "hyb_vMF")
107107
## Data application: test for the rotational symmetry of sunspots
108108

109109
The data application in García-Portugués, Paindaveine and Verdebout
110-
(2020) can be reproduced through the script
110+
(2020) can be replicated through the script
111111
[sunspots-births.R](https://github.com/egarpor/rotasym/blob/master/data-raw/sunspots-births.R)
112112
(data gathering and preprocessing) and the code snippet below.
113113

@@ -183,12 +183,6 @@ example("sunspots_births")
183183
#> snspt_+ radius = 1, type = "s", col = "lightblue", alpha = 0.25,
184184
#> snspt_+ lit = FALSE)
185185
#> snspt_+ }
186-
#> Error in dyn.load(dynlib <- getDynlib(dir)) :
187-
#> unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so':
188-
#> dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so, 6): Symbol not found: _hb_buffer_add_utf8
189-
#> Referenced from: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
190-
#> Expected in: flat namespace
191-
#> in /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
192186
#>
193187
#> snspt_> n_cols <- 100
194188
#>
@@ -199,12 +193,6 @@ example("sunspots_births")
199193
#> snspt_> if (requireNamespace("rgl")) {
200194
#> snspt_+ rgl::points3d(sunspots_23$X, col = viridisLite::viridis(n_cols)[cuts])
201195
#> snspt_+ }
202-
#> Error in dyn.load(dynlib <- getDynlib(dir)) :
203-
#> unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so':
204-
#> dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so, 6): Symbol not found: _hb_buffer_add_utf8
205-
#> Referenced from: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
206-
#> Expected in: flat namespace
207-
#> in /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
208196
#>
209197
#> snspt_> # Spörer's law: sunspots at the beginning of the solar cycle (dark blue
210198
#> snspt_> # color) tend to appear at higher latitutes, gradually decreasing to the
@@ -218,76 +206,75 @@ example("sunspots_births")
218206
#> snspt_> plot(kde <- density(x = V, bw = h, n = 2^13, from = -1, to = 1), col = 1,
219207
#> snspt_+ xlim = c(-1, 1), ylim = c(0, 3), axes = FALSE, main = "",
220208
#> snspt_+ xlab = "Cosines (latitude angles)", lwd = 2)
209+
#>
210+
#> snspt_> at <- seq(-1, 1, by = 0.25)
211+
#>
212+
#> snspt_> axis(2); axis(1, at = at)
213+
#>
214+
#> snspt_> axis(1, at = at, line = 1, tick = FALSE,
215+
#> snspt_+ labels = paste0("(", 90 - round(acos(at) / pi * 180, 1), "º)"))
216+
#>
217+
#> snspt_> rug(V)
218+
#>
219+
#> snspt_> legend("topright", legend = c("Full cycle", "Initial 25% cycle",
220+
#> snspt_+ "Final 25% cycle"),
221+
#> snspt_+ lwd = 2, col = c(1, viridisLite::viridis(12)[c(3, 8)]))
222+
#>
223+
#> snspt_> # Density for the observations within the initial 25% of the cycle
224+
#> snspt_> part1 <- sunspots_23$date < quantile(sunspots_23$date, 0.25)
225+
#>
226+
#> snspt_> V1 <- cosines(X = sunspots_23$X[part1, ], theta = c(0, 0, 1))
227+
#>
228+
#> snspt_> h1 <- bw.SJ(x = V1, method = "dpi")
229+
#>
230+
#> snspt_> lines(kde1 <- density(x = V1, bw = h1, n = 2^13, from = -1, to = 1),
231+
#> snspt_+ col = viridisLite::viridis(12)[3], lwd = 2)
232+
#>
233+
#> snspt_> # Density for the observations within the final 25% of the cycle
234+
#> snspt_> part2 <- sunspots_23$date > quantile(sunspots_23$date, 0.75)
235+
#>
236+
#> snspt_> V2 <- cosines(X = sunspots_23$X[part2, ], theta = c(0, 0, 1))
237+
#>
238+
#> snspt_> h2 <- bw.SJ(x = V2, method = "dpi")
239+
#>
240+
#> snspt_> lines(kde2 <- density(x = V2, bw = h2, n = 2^13, from = -1, to = 1),
241+
#> snspt_+ col = viridisLite::viridis(12)[8], lwd = 2)
242+
#>
243+
#> snspt_> # Computation the level set of a kernel density estimator that contains
244+
#> snspt_> # at least 1 - alpha of the probability (kde stands for an object
245+
#> snspt_> # containing the output of density(x = data))
246+
#> snspt_> kde_level_set <- function(kde, data, alpha) {
247+
#> snspt_+
248+
#> snspt_+ # Estimate c from alpha
249+
#> snspt_+ c <- quantile(approx(x = kde$x, y = kde$y, xout = data)$y, probs = alpha)
250+
#> snspt_+
251+
#> snspt_+ # Begin and end index for the potentially many intervals in the level sets
252+
#> snspt_+ kde_larger_c <- kde$y >= c
253+
#> snspt_+ run_length_kde <- rle(kde_larger_c)
254+
#> snspt_+ begin <- which(diff(kde_larger_c) > 0) + 1
255+
#> snspt_+ end <- begin + run_length_kde$lengths[run_length_kde$values] - 1
256+
#> snspt_+
257+
#> snspt_+ # Return the [a_i, b_i], i = 1, ..., K in the K rows
258+
#> snspt_+ return(cbind(kde$x[begin], kde$x[end]))
259+
#> snspt_+
260+
#> snspt_+ }
261+
#>
262+
#> snspt_> # Level set containing the 90% of the probability, in latitude angles
263+
#> snspt_> 90 - acos(kde_level_set(kde = kde, data = V, alpha = 0.10)) / pi * 180
264+
#> [,1] [,2]
265+
#> [1,] -29.448244 -2.455986
266+
#> [2,] 2.582017 28.123329
267+
#>
268+
#> snspt_> # Modes (in cosines and latitude angles)
269+
#> snspt_> modes <- c(kde$x[kde$x < 0][which.max(kde$y[kde$x < 0])],
270+
#> snspt_+ kde$x[kde$x > 0][which.max(kde$y[kde$x > 0])])
271+
#>
272+
#> snspt_> 90 - acos(modes) / pi * 180
273+
#> [1] -13.69322 16.49001
221274
```
222275

223276
<img src="README/README-sunspots_births-1.png" style="display: block; margin: auto;" />
224277

225-
#>
226-
#> snspt_> at <- seq(-1, 1, by = 0.25)
227-
#>
228-
#> snspt_> axis(2); axis(1, at = at)
229-
#>
230-
#> snspt_> axis(1, at = at, line = 1, tick = FALSE,
231-
#> snspt_+ labels = paste0("(", 90 - round(acos(at) / pi * 180, 1), "º)"))
232-
#>
233-
#> snspt_> rug(V)
234-
#>
235-
#> snspt_> legend("topright", legend = c("Full cycle", "Initial 25% cycle",
236-
#> snspt_+ "Final 25% cycle"),
237-
#> snspt_+ lwd = 2, col = c(1, viridisLite::viridis(12)[c(3, 8)]))
238-
#>
239-
#> snspt_> # Density for the observations within the initial 25% of the cycle
240-
#> snspt_> part1 <- sunspots_23$date < quantile(sunspots_23$date, 0.25)
241-
#>
242-
#> snspt_> V1 <- cosines(X = sunspots_23$X[part1, ], theta = c(0, 0, 1))
243-
#>
244-
#> snspt_> h1 <- bw.SJ(x = V1, method = "dpi")
245-
#>
246-
#> snspt_> lines(kde1 <- density(x = V1, bw = h1, n = 2^13, from = -1, to = 1),
247-
#> snspt_+ col = viridisLite::viridis(12)[3], lwd = 2)
248-
#>
249-
#> snspt_> # Density for the observations within the final 25% of the cycle
250-
#> snspt_> part2 <- sunspots_23$date > quantile(sunspots_23$date, 0.75)
251-
#>
252-
#> snspt_> V2 <- cosines(X = sunspots_23$X[part2, ], theta = c(0, 0, 1))
253-
#>
254-
#> snspt_> h2 <- bw.SJ(x = V2, method = "dpi")
255-
#>
256-
#> snspt_> lines(kde2 <- density(x = V2, bw = h2, n = 2^13, from = -1, to = 1),
257-
#> snspt_+ col = viridisLite::viridis(12)[8], lwd = 2)
258-
#>
259-
#> snspt_> # Computation the level set of a kernel density estimator that contains
260-
#> snspt_> # at least 1 - alpha of the probability (kde stands for an object
261-
#> snspt_> # containing the output of density(x = data))
262-
#> snspt_> kde_level_set <- function(kde, data, alpha) {
263-
#> snspt_+
264-
#> snspt_+ # Estimate c from alpha
265-
#> snspt_+ c <- quantile(approx(x = kde$x, y = kde$y, xout = data)$y, probs = alpha)
266-
#> snspt_+
267-
#> snspt_+ # Begin and end index for the potentially many intervals in the level sets
268-
#> snspt_+ kde_larger_c <- kde$y >= c
269-
#> snspt_+ run_length_kde <- rle(kde_larger_c)
270-
#> snspt_+ begin <- which(diff(kde_larger_c) > 0)
271-
#> snspt_+ end <- begin + run_length_kde$lengths[run_length_kde$values] - 1
272-
#> snspt_+
273-
#> snspt_+ # Return the [a_i, b_i], i = 1, ..., K in the K rows
274-
#> snspt_+ return(cbind(kde$x[begin], kde$x[end]))
275-
#> snspt_+
276-
#> snspt_+ }
277-
#>
278-
#> snspt_> # Level set containing the 90% of the probability, in latitude angles
279-
#> snspt_> 90 - acos(kde_level_set(kde = kde, data = V, alpha = 0.10)) / pi * 180
280-
#> [,1] [,2]
281-
#> [1,] -29.464311 -2.469989
282-
#> [2,] 2.568013 28.107467
283-
#>
284-
#> snspt_> # Modes (in cosines and latitude angles)
285-
#> snspt_> modes <- c(kde$x[kde$x < 0][which.max(kde$y[kde$x < 0])],
286-
#> snspt_+ kde$x[kde$x > 0][which.max(kde$y[kde$x > 0])])
287-
#>
288-
#> snspt_> 90 - acos(modes) / pi * 180
289-
#> [1] -13.69322 16.49001
290-
291278
## References
292279

293280
García-Portugués, E., Paindaveine, D., and Verdebout, T. (2020). On

README/README-sunspots_births-1.png

-229 Bytes
Loading

cran-comments.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,17 @@ This is a submission to fix the problems shown on https://cran.r-project.org/web
33

44
## Test environments
55

6-
* local R installation, R 4.1.0
7-
* ubuntu 16.04 (on travis-ci), R 3.4.0
6+
* local R installation, R 4.2.2
87
* win-builder (release, devel)
9-
* Windows Server 2008 R2 SP1, R-devel, 32/64 bit (on R-hub)
10-
* Windows Server 2008 R2 SP1, R-release, 32/64 bit (on R-hub)
11-
* Windows Server 2008 R2 SP1, R-oldrel, 32/64 bit (on R-hub)
12-
* Ubuntu Linux 16.04 LTS, R-release, GCC (on R-hub)
13-
* Fedora Linux, R-devel, clang, gfortran (on R-hub)
14-
* Debian Linux, R-devel, GCC ASAN/UBSAN (on R-hub)
15-
* macOS 10.13.6 High Sierra, R-release, brew (on R-hub)
16-
* macOS 10.13.6 High Sierra, R-release, CRAN's setup (on R-hub)
17-
* Oracle Solaris 10, x86, 32 bit, R-release (on R-hub)
18-
* Oracle Solaris 10, x86, 32 bit, R-release, Oracle Developer Studio 12.6 (on R-hub)
19-
20-
On some platforms:
21-
22-
* "Found the following (possibly) invalid URLs" -- double-checked and correctly spelled
8+
* Windows Server 2022, R-release, 32/64 bit
9+
* Windows Server 2022, R-devel, 64 bit
10+
* Windows Server 2022, R-oldrel, 32/64 bit
11+
* Windows Server 2022, R-patched, 32/64 bit
12+
* Ubuntu Linux 20.04.1 LTS, R-release, GCC
13+
* Ubuntu Linux 20.04.1 LTS, R-devel, GCC
14+
* Debian Linux, R-release, GCC
15+
* Debian Linux, R-devel, GCC
2316

2417
## R CMD check results
2518

26-
0 errors | 0 warnings | 0 notes
27-
19+
0 errors | 0 warnings | 0 notes

inst/CITATION

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ note <- paste("R package version", meta$Version)
44

55
citHeader("To cite rotasym in publications use:")
66

7-
citEntry(entry = "Manual",
7+
bibentry(
8+
bibtype = "Manual",
89
title = "{rotasym}: Tests for Rotational Symmetry on the Hypersphere",
9-
author = personList(as.person("Eduardo Garc\\'ia-Portugu\\'es"),
10-
as.person("Davy Paindaveine"),
11-
as.person("Thomas Verdebout")),
10+
author = c(person(given = "Eduardo", family = "García-Portugués"),
11+
person(given = "Davy", family = "Paindaveine"),
12+
person(given = "Thomas", family = "Verdebout")),
1213
year = year,
1314
note = note,
1415
url = "https://CRAN.R-project.org/package=rotasym",
@@ -18,11 +19,12 @@ citEntry(entry = "Manual",
1819
paste0(note, "."), "https://CRAN.R-project.org/package=rotasym")
1920
)
2021

21-
citEntry(entry = "Article",
22+
bibentry(
23+
bibtype = "Article",
2224
title = "On optimal tests for rotational symmetry against new classes of hyperspherical distributions",
23-
author = personList(as.person("Eduardo Garc\\'ia-Portugu\\'es"),
24-
as.person("Davy Paindaveine"),
25-
as.person("Thomas Verdebout")),
25+
author = c(person(given = "Eduardo", family = "García-Portugués"),
26+
person(given = "Davy", family = "Paindaveine"),
27+
person(given = "Thomas", family = "Verdebout")),
2628
journal = "Journal of the American Statistical Association",
2729
year = "2020",
2830
volume = "115",

src/Makevars

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
## Set PKG_LIBS
22
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
3-
4-
## With R 3.1.0 or later, you can uncomment the following line to tell R to
5-
## enable compilation with C++11 (or even C++14) where available
6-
CXX_STD = CXX11

src/Makevars.win

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
## Set PKG_LIBS
22
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
3-
4-
## With R 3.1.0 or later, you can uncomment the following line to tell R to
5-
## enable compilation with C++11 (or even C++14) where available
6-
CXX_STD = CXX11

0 commit comments

Comments
 (0)