From 9cefbce8432f95f7e1e70aac4ace106e27f8d797 Mon Sep 17 00:00:00 2001 From: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr> Date: Fri, 16 Aug 2024 13:01:45 +0200 Subject: [PATCH] fixed CRAN NOTE on documentation (issue #11) --- DESCRIPTION | 2 +- R/ridgeSIR.R | 14 +++++++------- R/sparseSIR.R | 26 ++++++++++++++------------ man/SISIR.Rd | 10 +++++----- man/ridgeSIR.Rd | 14 +++++++------- man/sparseSIR.Rd | 16 +++++++++------- 6 files changed, 43 insertions(+), 39 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e141054..4a99111 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -41,6 +41,6 @@ Imports: Suggests: testthat License: GPL (>= 2) -RoxygenNote: 7.1.2 +RoxygenNote: 7.3.1 Encoding: UTF-8 Repository: CRAN diff --git a/R/ridgeSIR.R b/R/ridgeSIR.R index 27b0ace..a0b3acc 100644 --- a/R/ridgeSIR.R +++ b/R/ridgeSIR.R @@ -26,13 +26,13 @@ #' @param mu2 ridge regularization parameter (numeric, positive) #' @param d number of dimensions to be kept #' -#' @author {Victor Picheny, \email{victor.picheny@inrae.fr}\cr +#' @author Victor Picheny, \email{victor.picheny@inrae.fr}\cr #' Remi Servien, \email{remi.servien@inrae.fr}\cr -#' Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr}} +#' Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr} #' -#' @references {Picheny, V., Servien, R. and Villa-Vialaneix, N. (2019) +#' @references Picheny, V., Servien, R. and Villa-Vialaneix, N. (2019) #' Interpretable sparse SIR for digitized functional data. -#' \emph{Statistics and Computing}, \strong{29}(2), 255--267.} +#' \emph{Statistics and Computing}, \strong{29}(2), 255--267. #' #' @seealso \code{\link{sparseSIR}}, \code{\link{SISIR}}, #' \code{\link{tune.ridgeSIR}} @@ -49,20 +49,20 @@ #' \dontrun{print(res_ridge)} #' #' @return S3 object of class \code{ridgeRes}: a list consisting of -#' \itemize{ +#' \describe{ #' \item{\code{EDR}}{ the estimated EDR space (a p x d matrix)} #' \item{\code{condC}}{ the estimated slice projection on EDR (a d x H #' matrix)} #' \item{\code{eigenvalues}}{ the eigenvalues obtained during the generalized #' eigendecomposition performed by SIR} #' \item{\code{parameters}}{ a list of hyper-parameters for the method: -#' \itemize{ +#' \describe{ #' \item{\code{H}}{ number of slices} #' \item{\code{d}}{ dimension of the EDR space} #' \item{\code{mu2}}{ regularization parameter for the ridge penalty} #' }} #' \item{\code{utils}}{ useful outputs for further computations: -#' \itemize{ +#' \describe{ #' \item{\code{Sigma}}{ covariance matrix for x} #' \item{\code{slices}}{ slice number for all observations} #' \item{\code{invsqrtS}}{ value of the inverse square root of the diff --git a/R/sparseSIR.R b/R/sparseSIR.R index 646a9a1..7eb9bf7 100644 --- a/R/sparseSIR.R +++ b/R/sparseSIR.R @@ -50,29 +50,31 @@ #' res_sparse <- sparseSIR(res_ridge, rep(10, 20)) #' #' @return S3 object of class \code{sparseRes}: a list consisting of -#' \itemize{ +#' \describe{ #' \item{\code{sEDR}}{ the estimated EDR space (a p x d matrix)} #' \item{\code{alpha}}{ the estimated shrinkage coefficients (a vector having #' a length similar to \code{inter_len})} #' \item{\code{quality}}{ a vector with various qualities for the model (see #' Details)} #' \item{\code{adapt_res}}{ if \code{adaptive = TRUE}, a list of two vectors: -#' \itemize{ +#' \describe{ #' \item{\code{nonzeros}}{ indexes of variables that are strong non zeros} #' \item{\code{zeros}}{ indexes of variables that are strong zeros} #' }} #' \item{\code{parameters}}{ a list of hyper-parameters for the method: -#' \itemize{ +#' \describe{ #' \item{\code{inter_len}}{ lengths of intervals} #' \item{\code{sel_prop}}{ if \code{adaptive = TRUE}, fraction of the #' coefficients which are considered as strong zeros or strong non zeros} #' }} #' \item{\code{rSIR}}{ same as the input \code{object}} #' \item{\code{fit}}{ a list for LASSO fit with: -#' \itemize{ -#' \item{\code{glmnet}} result of the \code{\link[glmnet]{glmnet}} function -#' \item{\code{lambda}} value of the best Lasso parameter by CV -#' \item{\code{x}} exploratory variable values as passed to fit the model +#' \describe{ +#' \item{\code{glmnet}}{ result of the \code{\link[glmnet]{glmnet}} +#' function} +#' \item{\code{lambda}}{ value of the best Lasso parameter by CV} +#' \item{\code{x}}{ exploratory variable values as passed to fit the +#' model} #' }} #' } #' @@ -310,13 +312,13 @@ project <- function(object) { #' number of parameters is either the number of non null intervals or the #' number of non null parameters with respect to the original variables #' -#' @author {Victor Picheny, \email{victor.picheny@inrae.fr}\cr +#' @author Victor Picheny, \email{victor.picheny@inrae.fr}\cr #' Remi Servien, \email{remi.servien@inrae.fr}\cr -#' Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr}} +#' Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr} #' -#' @references {Picheny, V., Servien, R. and Villa-Vialaneix, N. (2016) +#' @references Picheny, V., Servien, R. and Villa-Vialaneix, N. (2016) #' Interpretable sparse SIR for digitized functional data. -#' \emph{Statistics and Computing}, \strong{29}(2), 255--267.} +#' \emph{Statistics and Computing}, \strong{29}(2), 255--267. #' #' @seealso \code{\link{ridgeSIR}}, \code{\link{sparseSIR}} #' @@ -335,7 +337,7 @@ project <- function(object) { #' \dontrun{res_fused <- SISIR(res_ridge, rep(1, ncol(x)))} #' #' @return S3 object of class \code{SISIR}: a list consisting of -#' \itemize{ +#' \describe{ #' \item{\code{sEDR}}{ the estimated EDR spaces (a list of p x d matrices)} #' \item{\code{alpha}}{ the estimated shrinkage coefficients (a list of #' vectors)} diff --git a/man/SISIR.Rd b/man/SISIR.Rd index ffa47d2..42f3234 100644 --- a/man/SISIR.Rd +++ b/man/SISIR.Rd @@ -37,7 +37,7 @@ NULL, all available cores minus one are used} } \value{ S3 object of class \code{SISIR}: a list consisting of -\itemize{ +\describe{ \item{\code{sEDR}}{ the estimated EDR spaces (a list of p x d matrices)} \item{\code{alpha}}{ the estimated shrinkage coefficients (a list of vectors)} @@ -78,15 +78,15 @@ res_ridge <- ridgeSIR(x, y, H = 10, d = 2, mu2 = 10^8) } \references{ -{Picheny, V., Servien, R. and Villa-Vialaneix, N. (2016) +Picheny, V., Servien, R. and Villa-Vialaneix, N. (2016) Interpretable sparse SIR for digitized functional data. -\emph{Statistics and Computing}, \strong{29}(2), 255--267.} +\emph{Statistics and Computing}, \strong{29}(2), 255--267. } \seealso{ \code{\link{ridgeSIR}}, \code{\link{sparseSIR}} } \author{ -{Victor Picheny, \email{victor.picheny@inrae.fr}\cr +Victor Picheny, \email{victor.picheny@inrae.fr}\cr Remi Servien, \email{remi.servien@inrae.fr}\cr -Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr}} +Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr} } diff --git a/man/ridgeSIR.Rd b/man/ridgeSIR.Rd index 1a4116a..248061b 100644 --- a/man/ridgeSIR.Rd +++ b/man/ridgeSIR.Rd @@ -19,20 +19,20 @@ ridgeSIR(x, y, H, d, mu2 = NULL) } \value{ S3 object of class \code{ridgeRes}: a list consisting of -\itemize{ +\describe{ \item{\code{EDR}}{ the estimated EDR space (a p x d matrix)} \item{\code{condC}}{ the estimated slice projection on EDR (a d x H matrix)} \item{\code{eigenvalues}}{ the eigenvalues obtained during the generalized eigendecomposition performed by SIR} \item{\code{parameters}}{ a list of hyper-parameters for the method: - \itemize{ + \describe{ \item{\code{H}}{ number of slices} \item{\code{d}}{ dimension of the EDR space} \item{\code{mu2}}{ regularization parameter for the ridge penalty} }} \item{\code{utils}}{ useful outputs for further computations: - \itemize{ + \describe{ \item{\code{Sigma}}{ covariance matrix for x} \item{\code{slices}}{ slice number for all observations} \item{\code{invsqrtS}}{ value of the inverse square root of the @@ -60,16 +60,16 @@ res_ridge <- ridgeSIR(x, y, H = 10, d = 2, mu2 = 10^8) } \references{ -{Picheny, V., Servien, R. and Villa-Vialaneix, N. (2019) +Picheny, V., Servien, R. and Villa-Vialaneix, N. (2019) Interpretable sparse SIR for digitized functional data. -\emph{Statistics and Computing}, \strong{29}(2), 255--267.} +\emph{Statistics and Computing}, \strong{29}(2), 255--267. } \seealso{ \code{\link{sparseSIR}}, \code{\link{SISIR}}, \code{\link{tune.ridgeSIR}} } \author{ -{Victor Picheny, \email{victor.picheny@inrae.fr}\cr +Victor Picheny, \email{victor.picheny@inrae.fr}\cr Remi Servien, \email{remi.servien@inrae.fr}\cr -Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr}} +Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr} } diff --git a/man/sparseSIR.Rd b/man/sparseSIR.Rd index b6af598..84e64c4 100644 --- a/man/sparseSIR.Rd +++ b/man/sparseSIR.Rd @@ -34,29 +34,31 @@ NULL, all available cores minus one are used} } \value{ S3 object of class \code{sparseRes}: a list consisting of -\itemize{ +\describe{ \item{\code{sEDR}}{ the estimated EDR space (a p x d matrix)} \item{\code{alpha}}{ the estimated shrinkage coefficients (a vector having a length similar to \code{inter_len})} \item{\code{quality}}{ a vector with various qualities for the model (see Details)} \item{\code{adapt_res}}{ if \code{adaptive = TRUE}, a list of two vectors: - \itemize{ + \describe{ \item{\code{nonzeros}}{ indexes of variables that are strong non zeros} \item{\code{zeros}}{ indexes of variables that are strong zeros} }} \item{\code{parameters}}{ a list of hyper-parameters for the method: - \itemize{ + \describe{ \item{\code{inter_len}}{ lengths of intervals} \item{\code{sel_prop}}{ if \code{adaptive = TRUE}, fraction of the coefficients which are considered as strong zeros or strong non zeros} }} \item{\code{rSIR}}{ same as the input \code{object}} \item{\code{fit}}{ a list for LASSO fit with: - \itemize{ - \item{\code{glmnet}} result of the \code{\link[glmnet]{glmnet}} function - \item{\code{lambda}} value of the best Lasso parameter by CV - \item{\code{x}} exploratory variable values as passed to fit the model + \describe{ + \item{\code{glmnet}}{ result of the \code{\link[glmnet]{glmnet}} + function} + \item{\code{lambda}}{ value of the best Lasso parameter by CV} + \item{\code{x}}{ exploratory variable values as passed to fit the + model} }} } -- GitLab