diff --git a/CRAN-RELEASE b/CRAN-RELEASE new file mode 100644 index 0000000..753e9e0 --- /dev/null +++ b/CRAN-RELEASE @@ -0,0 +1,2 @@ +This package was submitted to CRAN on 2020-07-29. +Once it is accepted, delete this file and tag the release (commit f4b0d494af). diff --git a/DESCRIPTION b/DESCRIPTION index c073de7..d6a9b92 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,20 +1,20 @@ Package: rotasym Type: Package Title: Tests for Rotational Symmetry on the Hypersphere -Version: 1.0.7 -Date: 2020-03-08 +Version: 1.0.8 +Date: 2020-07-29 Authors@R: c( person(given = "Eduardo", family = "García-Portugués", role = c("aut", "cre"), email = "edgarcia@est-econ.uc3m.es"), person(given = "Davy", family = "Paindaveine", role = "aut"), person(given = "Thomas", family = "Verdebout", role = "aut") ) -Description: Implementation of the tests for rotational symmetry on the - hypersphere proposed in García-Portugués, Paindaveine and Verdebout - (2020) . The package also implements the proposed - distributions on the hypersphere, based on the tangent-normal - decomposition, and allows for the replication of the data - application considered in the paper. +Description: Implementation of the tests for rotational symmetry on the hypersphere + proposed in García-Portugués, Paindaveine and Verdebout (2020) + . The package also implements the + proposed distributions on the hypersphere, based on the tangent-normal + decomposition, and allows for the replication of the data application + considered in the paper. License: GPL-3 LazyData: true Depends: @@ -27,5 +27,5 @@ LinkingTo: Rcpp, RcppArmadillo URL: https://github.com/egarpor/rotasym BugReports: https://github.com/egarpor/rotasym Encoding: UTF-8 -RoxygenNote: 7.0.2 +RoxygenNote: 7.1.0 Roxygen: list(old_usage = TRUE) diff --git a/NEWS.md b/NEWS.md index 79ae058..26446b0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,13 +4,20 @@ # rotasym 1.0-5 -* Change description field in DESCRIPTION, minor aesthetic changes to examples +* Change description field in DESCRIPTION, minor aesthetic changes to examples. # rotasym 1.0-6 * Make the behaviour of `r_ACG` and `r_unif_sphere` consistent with `base::set.seed`: drop `RcppZiggurat`. -* Fix bug in NA handling in `check_unit_norm` +* Fix bug in NA handling in `check_unit_norm`. # rotasym 1.0.7 * Update reference and CITATION. + +# rotasym 1.0.8 + +* Allow `kappa` to be a vector in `c_vMF`. +* Add missing links to references and other fixes in documentation. +* Fix "Non-file package-anchored link(s) in documentation object". + diff --git a/R/ACG.R b/R/ACG.R index 53ab777..5ff36fc 100644 --- a/R/ACG.R +++ b/R/ACG.R @@ -42,6 +42,7 @@ #' @references #' Tyler, D. E. (1987). Statistical analysis for the angular central Gaussian #' distribution on the sphere. \emph{Biometrika}, 74(3):579--589. +#' \url{https://doi.org/10.1093/biomet/74.3.579} #' @examples #' # Simulation and density evaluation for p = 2 #' Lambda <- diag(c(5, 1)) diff --git a/R/data.R b/R/data.R index 7e270b4..85acfca 100644 --- a/R/data.R +++ b/R/data.R @@ -18,17 +18,17 @@ #' @docType data #' @format A data frame with 51303 rows and 6 variables: #' \describe{ -#' \item{date}{UTC date, as \code{\link[base]{POSIXct}}, of the first -#' observation of a group of sunspots.} +#' \item{date}{UTC date, as \code{\link[base:DateTimeClasses]{POSIXct}}, of +#' the first observation of a group of sunspots.} #' \item{cycle}{\href{https://en.wikipedia.org/wiki/List_of_solar_cycles}{ #' solar cycle} in which the group of sunspots was observed.} #' \item{total_area}{total whole spot area of the group, measured in #' millionths of the solar hemisphere.} #' \item{dist_sun_disc}{distance from the center of Sun's disc, measured in #' units of the solar radius.} -#' \item{theta}{mean colatitude angle \eqn{\theta \in [0, 2\pi)} of the +#' \item{theta}{mean longitude angle \eqn{\theta \in [0, 2\pi)} of the #' group position.} -#' \item{phi}{mean longitude angle \eqn{\phi \in [-\pi/2, \pi/2)} of the +#' \item{phi}{mean latitude angle \eqn{\phi \in [-\pi/2, \pi/2)} of the #' group position.} #' } #' @details @@ -71,7 +71,7 @@ #' Greenwich sunspot data. \emph{Solar Physics}, 291(9--10):3081--3102. #' \url{http://dx.doi.org/10.1007/s11207-016-0930-1} #' -#' Győri, L., Ludmány, A., Baranyi, T. (2017) Comparative analysis of Debrecen +#' Győri, L., Ludmány, A., Baranyi, T. (2019) Comparative analysis of Debrecen #' sunspot catalogues. \emph{Monthly Notices of the Royal Astronomical #' Society}, 465(2):1259--1273. \url{https://doi.org/10.1093/mnras/stw2667} #' @examples diff --git a/R/vMF.R b/R/vMF.R index 7d13bfa..64ce714 100644 --- a/R/vMF.R +++ b/R/vMF.R @@ -30,7 +30,7 @@ #' @param mu the directional mean \eqn{\boldsymbol{\mu}}{\mu} of the vMF. #' A unit-norm vector of length \code{p}. #' @param kappa concentration parameter \eqn{\kappa} of the vMF. -#' A nonnegative scalar. +#' A nonnegative scalar. Can be a vector for \code{c_vMF}. #' @param t a vector with values in \eqn{[-1, 1]}. #' @param scaled whether to scale the angular function by the von Mises--Fisher #' normalizing constant. Defaults to \code{TRUE}. @@ -53,6 +53,7 @@ #' @references #' Wood, A. T. A. (1994) Simulation of the von Mises Fisher distribution. #' \emph{Commun. Stat. Simulat.}, 23(1):157--164. +#' \url{https://doi.org/10.1080/03610919408813161} #' @examples #' # Simulation and density evaluation for p = 2 #' mu <- c(0, 1) @@ -133,9 +134,9 @@ d_vMF <- function(x, mu, kappa, log = FALSE) { c_vMF <- function(p, kappa, log = FALSE) { # Check kappa - if (kappa < 0) { + if (any(kappa < 0)) { - stop("kappa must be positive.") + stop("kappa must be non-negative.") } @@ -156,7 +157,7 @@ r_vMF <- function(n, mu, kappa) { mu <- check_unit_norm(x = mu, warnings = TRUE) if (kappa < 0) { - stop("kappa must be positive.") + stop("kappa must be non-negative.") } @@ -199,7 +200,7 @@ g_vMF <- function(t, p, kappa, scaled = TRUE, log = FALSE) { # Check kappa if (kappa < 0) { - stop("kappa must be positive.") + stop("kappa must be non-negative.") } diff --git a/cran-comments.md b/cran-comments.md index 4f91e22..2a0c946 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,8 +1,13 @@ ## Test environments -* local OS X install, R 3.6.1 -* ubuntu 14.04 (on travis-ci), R 3.6.1 -* win-builder (devel and release) + +* local R installation, R 3.6.3 +* ubuntu 16.04 (on travis-ci), R 3.6.3 +* win-builder (devel) + +One note in Ubuntu Linux 16.04 LTS, R-release, GCC about +"Found the following (possibly) invalid URLs" +but the cited URLs work properly. ## R CMD check results -0 errors | 0 warnings | 0 note +0 errors | 0 warnings | 0 notes diff --git a/man/ACG.Rd b/man/ACG.Rd index c853f37..752daec 100644 --- a/man/ACG.Rd +++ b/man/ACG.Rd @@ -84,6 +84,7 @@ rgl::plot3d(x, col = col[rank(d_ACG(x = x, Lambda = Lambda))], size = 5) \references{ Tyler, D. E. (1987). Statistical analysis for the angular central Gaussian distribution on the sphere. \emph{Biometrika}, 74(3):579--589. +\url{https://doi.org/10.1093/biomet/74.3.579} } \seealso{ \code{\link{tangent-elliptical}}. diff --git a/man/sunspots_births.Rd b/man/sunspots_births.Rd index 42cc198..cd5b8e2 100644 --- a/man/sunspots_births.Rd +++ b/man/sunspots_births.Rd @@ -4,21 +4,23 @@ \name{sunspots_births} \alias{sunspots_births} \title{Recorded sunspots births during 1872--2018} -\format{A data frame with 51303 rows and 6 variables: +\format{ +A data frame with 51303 rows and 6 variables: \describe{ - \item{date}{UTC date, as \code{\link[base]{POSIXct}}, of the first - observation of a group of sunspots.} + \item{date}{UTC date, as \code{\link[base:DateTimeClasses]{POSIXct}}, of + the first observation of a group of sunspots.} \item{cycle}{\href{https://en.wikipedia.org/wiki/List_of_solar_cycles}{ solar cycle} in which the group of sunspots was observed.} \item{total_area}{total whole spot area of the group, measured in millionths of the solar hemisphere.} \item{dist_sun_disc}{distance from the center of Sun's disc, measured in units of the solar radius.} - \item{theta}{mean colatitude angle \eqn{\theta \in [0, 2\pi)} of the + \item{theta}{mean longitude angle \eqn{\theta \in [0, 2\pi)} of the group position.} - \item{phi}{mean longitude angle \eqn{\phi \in [-\pi/2, \pi/2)} of the + \item{phi}{mean latitude angle \eqn{\phi \in [-\pi/2, \pi/2)} of the group position.} -}} +} +} \source{ \url{http://fenyi.solarobs.csfk.mta.hu} } @@ -158,7 +160,7 @@ compiled at the Debrecen observatory and their extensions with the Greenwich sunspot data. \emph{Solar Physics}, 291(9--10):3081--3102. \url{http://dx.doi.org/10.1007/s11207-016-0930-1} -Győri, L., Ludmány, A., Baranyi, T. (2017) Comparative analysis of Debrecen +Győri, L., Ludmány, A., Baranyi, T. (2019) Comparative analysis of Debrecen sunspot catalogues. \emph{Monthly Notices of the Royal Astronomical Society}, 465(2):1259--1273. \url{https://doi.org/10.1093/mnras/stw2667} } diff --git a/man/vMF.Rd b/man/vMF.Rd index 10e2b36..93b3b32 100644 --- a/man/vMF.Rd +++ b/man/vMF.Rd @@ -28,7 +28,7 @@ internally if required (with a \code{warning} message).} A unit-norm vector of length \code{p}.} \item{kappa}{concentration parameter \eqn{\kappa} of the vMF. -A nonnegative scalar.} +A nonnegative scalar. Can be a vector for \code{c_vMF}.} \item{log}{flag to indicate if the logarithm of the density (or the normalizing constant) is to be computed.} @@ -130,6 +130,7 @@ for (p in 3:M) { \references{ Wood, A. T. A. (1994) Simulation of the von Mises Fisher distribution. \emph{Commun. Stat. Simulat.}, 23(1):157--164. +\url{https://doi.org/10.1080/03610919408813161} } \seealso{ \code{\link{tangent-vMF}}.