From b63f2d3f3cb5635869351c585285b0e4b9cde70b Mon Sep 17 00:00:00 2001 From: Thomas Wutzler Date: Wed, 24 Jan 2024 10:00:26 +0100 Subject: [PATCH] fix empty documentation of some arguments --- .gitignore | 4 ++++ DESCRIPTION | 2 +- NEWS.md | 21 ++++++++++++--------- R/logitnorm.R | 22 +++++++++++++--------- cran-comments.md | 6 ++---- inst/WORDLIST | 36 ++++++++++++++++++++++++++++++++++++ man/dlogitnorm.Rd | 5 ++--- man/invlogit.Rd | 6 ++---- man/logit.Rd | 6 ++---- man/plogitnorm.Rd | 8 +++----- man/qlogitnorm.Rd | 8 +++----- man/twCoefLogitnorm.Rd | 5 +---- man/twCoefLogitnormE.Rd | 3 +-- 13 files changed, 82 insertions(+), 50 deletions(-) create mode 100644 inst/WORDLIST diff --git a/.gitignore b/.gitignore index 8846cf8..8c91ce7 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,7 @@ vignettes/*.pdf /.svn .Rproj.user *.Rproj +# twutz 2401 +/tmp/ +/tests/testthat/Rplots.pdf + diff --git a/DESCRIPTION b/DESCRIPTION index 31eaf9c..483fd1b 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: logitnorm Title: Functions for the Logitnormal Distribution -Version: 0.8.38 +Version: 0.8.39 Author: Thomas Wutzler Maintainer: Thomas Wutzler Description: Density, distribution, quantile and random generation function for the logitnormal distribution. Estimation of the mode and the first two moments. Estimation of distribution parameters. diff --git a/NEWS.md b/NEWS.md index 5c4c64d..f4fb6fc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,26 +1,29 @@ -# logitnorm 0.8.38 -- Reworked twCoefLogitnormMLEFlat +# version 0.8.39 +fix empty documentation of some arguments + +# version 0.8.38 +- Reworked twCoefversionMLEFlat - Migrated from RUnit to testthat -# logitnorm 0.8.37 +# version 0.8.37 - Density returns 0 instead of NAN outside (0,1) -- Changed first argument name of dlogitnorm from q to x -- Document argument n of rlogitnorm +- Changed first argument name of dversion from q to x +- Document argument n of rversion -# logitnorm 0.8.36 +# version 0.8.36 Remove the library call to MASS. -# logitnorm 0.8.35 +# version 0.8.35 Avoid writing file reports during testing and installation. -# logitnorm 0.8.33 +# version 0.8.33 ## New features ### density on log-scale -Thanks to @madeleine-empirical the density function `dlogitnorm` now has `log` an argument that allows computing the density directly at log-scale. +Thanks to @madeleine-empirical the density function `dversion` now has `log` an argument that allows computing the density directly at log-scale. ## Further changes diff --git a/R/logitnorm.R b/R/logitnorm.R index 5ccd96a..bc75f84 100755 --- a/R/logitnorm.R +++ b/R/logitnorm.R @@ -5,7 +5,8 @@ logit <- function( ### Transforming (0,1) to normal scale (-Inf Inf) - p,... + p ##<< percentile + ,... ##<< further arguments to qlogis ){ ##details<< ## function \eqn{logit(p) = log \left( \frac{p}{1-p} \right) = log(p) - log(1-p)} @@ -16,7 +17,8 @@ logit <- function( invlogit <- function( ### Transforming (-Inf,Inf) to original scale (0,1) - q,... + q, ##<< quantile + ... ##<< further arguments to plogis ){ ##details<< ## function \eqn{f(z) = \frac{e^{z}}{e^{z} + 1} \! = \frac{1}{1 + e^{-z}} \!} @@ -42,8 +44,9 @@ rlogitnorm <- function( plogitnorm <- function( ### Distribution function for logitnormal distribution q ##<< vector of quantiles - , mu = 0, sigma = 1 ##<< distribution parameters - , ... + , mu = 0 ##<< location distribution parameter + , sigma = 1 ##<< scale distribution parameter + , ... ##<< further arguments to pnorm ){ ##seealso<< \code{\link{logitnorm}} ql <- qlogis(q) @@ -54,7 +57,8 @@ plogitnorm <- function( dlogitnorm <- function( ### Density function of logitnormal distribution x ##<< vector of quantiles - , mu = 0, sigma = 1 ##<< distribution parameters + , mu = 0 ##<< scale distribution parameter + , sigma = 1 ##<< location distribution parameter , log = FALSE ##<< if TRUE, the log-density is returned , ... ##<< further arguments passed to \code{\link{dnorm}}: \code{mean}, ## and \code{sd} for mu and sigma respectively. @@ -89,8 +93,9 @@ dlogitnorm <- function( qlogitnorm <- function( ### Quantiles of logitnormal distribution. p ##<< vector of probabilities - , mu = 0, sigma = 1 ##<< distribution parameters - , ... + , mu = 0 ##<< location distribution parameter + , sigma = 1 ##<< scale distribution parameter + , ... ##<< further arguments to plogis ){ ##seealso<< \code{\link{logitnorm}} qn <- qnorm(p,mean = mu,sd = sigma,...) @@ -166,7 +171,6 @@ twCoefLogitnorm <- function( median ##<< numeric vector: the median of the density function , quant ##<< numeric vector: the upper quantile value , perc = 0.975 ##<< numeric vector: the probability for which the quantile was specified - , ... ){ ##seealso<< \code{\link{logitnorm}} # twCoefLogitnorm @@ -397,7 +401,7 @@ twCoefLogitnormE <- function( , theta0 = c(mu = 0,sigma = 1) ##<< starting parameters , returnDetails = FALSE ##<< if TRUE, the full output of optim is returned ## with attribute resOptim - , ... + , ... ##<< further arguments to optim ){ ##seealso<< \code{\link{logitnorm}} # twCoefLogitnormE diff --git a/cran-comments.md b/cran-comments.md index d093804..96f21d3 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,11 +1,9 @@ ## Note -Added random seeds to tests to avoid accidental failing, -and markdown dependency to Suggests. +Fixed empty Rd comments for some arguments. ## Test environments -* local R 4.0.3 on Mint 20 64bit +* local R 4.3.2 on Mint 21.2 64bit * r-hub.io -* winbuilder ## R CMD check results There were no ERRORs nor WARNINGs nor NOTEs diff --git a/inst/WORDLIST b/inst/WORDLIST new file mode 100644 index 0000000..a266283 --- /dev/null +++ b/inst/WORDLIST @@ -0,0 +1,36 @@ +Logitnormal +README +RUnit +Rmd +dlogitnorm +dversion +github +invlogit +logitnormal +md +mle +modeLogitnorm +momentsLogitnorm +optim +perc +plogis +plogitnorm +pnorm +precisions +qlogis +qlogitnorm +quant +resOptim +rlogitnorm +rversion +sigmaFac +testthat +twCoefLogitnorm +twCoefLogitnormCi +twCoefLogitnormE +twCoefLogitnormMLE +twCoefLogitnormMLEFlat +twCoefLogitnormN +twCoefversionMLEFlat +twSigmaLogitnorm +vectorized diff --git a/man/dlogitnorm.Rd b/man/dlogitnorm.Rd index 4039f94..bae2c7d 100755 --- a/man/dlogitnorm.Rd +++ b/man/dlogitnorm.Rd @@ -6,9 +6,8 @@ ...)} \arguments{ \item{x}{vector of quantiles} - \item{mu}{distribution parameters} - \item{sigma}{ -} + \item{mu}{scale distribution parameter} + \item{sigma}{location distribution parameter} \item{log}{if TRUE, the log-density is returned} \item{\dots}{further arguments passed to \code{\link{dnorm}}: \code{mean}, and \code{sd} for mu and sigma respectively. } diff --git a/man/invlogit.Rd b/man/invlogit.Rd index 458b598..d1bb72a 100755 --- a/man/invlogit.Rd +++ b/man/invlogit.Rd @@ -4,10 +4,8 @@ \description{Transforming (-Inf,Inf) to original scale (0,1)} \usage{invlogit(q, ...)} \arguments{ - \item{q}{ -} - \item{\dots}{ -} + \item{q}{quantile} + \item{\dots}{further arguments to plogis} } \details{function \eqn{f(z) = \frac{e^{z}}{e^{z} + 1} \! = \frac{1}{1 + e^{-z}} \!}} diff --git a/man/logit.Rd b/man/logit.Rd index ac062ce..156cfe8 100755 --- a/man/logit.Rd +++ b/man/logit.Rd @@ -4,10 +4,8 @@ \description{Transforming (0,1) to normal scale (-Inf Inf)} \usage{logit(p, ...)} \arguments{ - \item{p}{ -} - \item{\dots}{ -} + \item{p}{percentile} + \item{\dots}{further arguments to qlogis} } \details{function \eqn{logit(p) = log \left( \frac{p}{1-p} \right) = log(p) - log(1-p)}} diff --git a/man/plogitnorm.Rd b/man/plogitnorm.Rd index efbe67a..5ff8a78 100755 --- a/man/plogitnorm.Rd +++ b/man/plogitnorm.Rd @@ -5,11 +5,9 @@ \usage{plogitnorm(q, mu = 0, sigma = 1, ...)} \arguments{ \item{q}{vector of quantiles} - \item{mu}{distribution parameters} - \item{sigma}{ -} - \item{\dots}{ -} + \item{mu}{location distribution parameter} + \item{sigma}{scale distribution parameter} + \item{\dots}{further arguments to pnorm} } diff --git a/man/qlogitnorm.Rd b/man/qlogitnorm.Rd index 9486513..4c7294e 100755 --- a/man/qlogitnorm.Rd +++ b/man/qlogitnorm.Rd @@ -5,11 +5,9 @@ \usage{qlogitnorm(p, mu = 0, sigma = 1, ...)} \arguments{ \item{p}{vector of probabilities} - \item{mu}{distribution parameters} - \item{sigma}{ -} - \item{\dots}{ -} + \item{mu}{location distribution parameter} + \item{sigma}{scale distribution parameter} + \item{\dots}{further arguments to plogis} } diff --git a/man/twCoefLogitnorm.Rd b/man/twCoefLogitnorm.Rd index bdf8b6f..e1b2153 100755 --- a/man/twCoefLogitnorm.Rd +++ b/man/twCoefLogitnorm.Rd @@ -2,14 +2,11 @@ \alias{twCoefLogitnorm} \title{twCoefLogitnorm} \description{Estimating coefficients of logitnormal distribution from median and upper quantile } -\usage{twCoefLogitnorm(median, quant, perc = 0.975, - ...)} +\usage{twCoefLogitnorm(median, quant, perc = 0.975)} \arguments{ \item{median}{numeric vector: the median of the density function} \item{quant}{numeric vector: the upper quantile value} \item{perc}{numeric vector: the probability for which the quantile was specified} - \item{\dots}{ -} } \value{numeric matrix with columns \code{c("mu","sigma")} diff --git a/man/twCoefLogitnormE.Rd b/man/twCoefLogitnormE.Rd index bea8a58..f22df85 100755 --- a/man/twCoefLogitnormE.Rd +++ b/man/twCoefLogitnormE.Rd @@ -14,8 +14,7 @@ specified} \item{theta0}{starting parameters} \item{returnDetails}{if TRUE, the full output of optim is returned with attribute resOptim} - \item{\dots}{ -} + \item{\dots}{further arguments to optim} } \value{named numeric matrix with estimated parameters of the logitnormal