diff --git a/.Rbuildignore b/.Rbuildignore index 0a735dd..cac7eb5 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,3 +6,4 @@ ^\.github$ ^README(\.|\.[a-z]+\.)md$ ^LICENSE\.md$ +^cran.comments\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index e5278c1..38a7bb2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ggd Type: Package Title: Gradational Gaussian Distribution Reference Class -Version: 1.0.1 +Version: 1.0.2 Authors@R: c( person( given = "Kimitsuna", family = "Ura", diff --git a/R/ggd.1.R b/R/ggd.1.R index 48b3cfb..22cd0a7 100644 --- a/R/ggd.1.R +++ b/R/ggd.1.R @@ -60,8 +60,8 @@ f.t3.p <- list( function( x, m, s ) #' @field mix.type An integer which represents how to mix normal distributions #' of the components. #' -#' The type of the distribution model and the row number of \code{cmp} -#' field will be as follows with this value: +#' The type of the distribution model and the number of rows +#' in \code{cmp} field will be as follows with this value: #' \itemize{ #' \item \code{0} : Normal distribution. #' \code{cmp} has only 1 row. @@ -389,7 +389,7 @@ GGD$methods( #' Clear fields #' #' Clears all fields. The lengths of all vector fields and the number of rows -#' in the \code{cmp} field will be \code{0}. +#' in \code{cmp} field will be \code{0}. #' @name clear #' @aliases clear #' @aliases \S4method{clear}{GGD} @@ -417,7 +417,7 @@ GGD$methods( ) ################################################################################################ -#' Adjust each row name of the cmp field. +#' Adjust each row name of cmp #' #' Sets each row name of \code{cmp} field according to \code{mix.type} field. #' Normally, users of this class don't need to call this method directly. @@ -474,7 +474,7 @@ GGD$methods( ) ################################################################################################ -#' Adjust the kind.index field +#' Adjust kind and kind.index fields #' #' Sets \code{kind.index} and \code{kind} fields according to #' \code{mix.type} and \code{cmp} fields. @@ -637,7 +637,7 @@ GGD$methods( ) ################################################################################################ -#' Index number of the kind of distribution +#' Index number of the kind #' #' Gets index numbers which represent the kinds of distributions. #' @export @@ -765,7 +765,7 @@ ggd.kind.index <- function( objs, undef.err = FALSE ) } ################################################################################################ -#' String of the kind of distribution +#' String of the kind #' #' Gets the strings which represent the kinds of distributions. #' @export @@ -819,7 +819,7 @@ ggd.kind <- function( objs ) } ################################################################################################ -#' Get mix.type according to grad +#' mix.type according to grad #' #' Gets the value for \code{mix.type} field of \code{GGD} object which is appropriate to #' given \code{grad} value. @@ -895,7 +895,7 @@ ggd.mix.type.for <- function( grad = c( "default", "normal", "h", "v", "v2", "v3 } ################################################################################################ -#' Get mix.type according to kind.index +#' mix.type according to kind.index #' #' Gets a vector of integers of \code{mix.type}s #' which are appropriate to the indicated index numbers of \code{ggd:::kinds}. @@ -931,7 +931,7 @@ ggd.mix.type.for.kind.index <- function( kind.index ) } ################################################################################################ -#' Get number of components according to the grad value and others +#' Number of components according to grad #' #' Gets the number of components for \code{cmp} field of \code{GGD} object #' which is appropriate to given \code{grad} or \code{mix.type} argument. @@ -1078,9 +1078,9 @@ GGD$methods( ) ################################################################################################ -#' Judge if normal distribution +#' Judge if normal #' -#' Referring only \code{cmp} field, checks if the distribution is a normal distribution. +#' Referring \code{cmp} field, checks if the distribution is essentially a normal distribution. #' Note, this function does not check \code{kind} and \code{kind.index} fields. #' @name is.normal #' @aliases is.normal @@ -1109,9 +1109,9 @@ GGD$methods( ) ################################################################################################ -#' Judge if horizontal gradational distribution +#' Judge if horizontal #' -#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially #' a horizontal gradational distribution. #' When \code{mix.type = 4}, if it is essentially a horizontal gradational distribution, #' this function returns \code{TRUE}. @@ -1168,9 +1168,9 @@ GGD$methods( ) ################################################################################################ -#' Judge if vertical gradation of 2 normal distributions +#' Judge if 2-component vertical #' -#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially #' a vertical gradation of 2 normal distributions. #' Even when \code{cmp} field has 3 rows with \code{mix.type = 3}, if the components of #' the left-tail side and the right-tail side are the same, this function returns \code{TRUE}, @@ -1233,9 +1233,9 @@ GGD$methods( ) ################################################################################################ -#' Judge if vertical gradation of 3 normal distributions +#' Judge if 3-component vertical #' -#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially #' a vertical gradation of 3 normal distributions. #' Note! when \code{mix.type = 4}, #' if the right-top-side and left-top-side components are the same @@ -1295,9 +1295,9 @@ GGD$methods( ) ################################################################################################ -#' Judge if horizontal-vertical gradation +#' Judge if horizontal-vertical #' -#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +#' Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially #' a horizontal-vertical gradation of 4 (2x2) normal distributions. #' @name is.hv #' @aliases is.hv @@ -1349,13 +1349,13 @@ GGD$methods( } else { - return ( isTRUE( mix.type == 4 ) && !is.h() && !is.v2() ) + return ( isTRUE( mix.type == 4 ) ) } } ) ################################################################################################ -#' Judge if symmetric distribution +#' Judge if symmetric #' #' Referring \code{mix.type} and \code{cmp} field, #' checks if the probability density function is symmetric about the mean. diff --git a/R/ggd.apply.R b/R/ggd.apply.R index 09911c5..09e272c 100644 --- a/R/ggd.apply.R +++ b/R/ggd.apply.R @@ -10,7 +10,7 @@ # Functions ################################################################################################ -#' Apply functions to elements of cmp +#' Apply functions to cmp #' #' Applies a function to each element in the \code{cmp} field. #' Different functions can be applied to \code{mean} column and \code{sd} column. @@ -58,7 +58,7 @@ #' (e.g., \code{\link[ggd]{adjust.cmp}}, \code{\link[ggd]{round.cmp}}, etc.) #' for the object of the 2nd argument, since they may update the values of the fields. #' -#' This function does not change the number of rows of the \code{cmp} field, +#' This function does not change the number of rows in \code{cmp} field, #' no matter what results are obtained. #' @examples #' a <- ggd.set.cmp( data.frame( mean = c( -0.5, 0, 0.5 ), sd = c( 1, 0.8, 1.2 ) ) ) @@ -137,12 +137,12 @@ apply.cmp.sub <- function( f, values, obj ) } ################################################################################################ -#' Rounding of numbers in cmp +#' Rounding values in cmp #' #' Rounds the values of all elements in the \code{cmp} field and adjusts other fields #' accordingly. #' \code{\link[base]{round}} and \code{\link[base]{signif}} functions can apply. -#' These functions does not change the number of rows of \code{cmp} field, +#' These functions does not change the number of rows in \code{cmp} field, #' no matter what results are obtained. #' If an error occurs, these functions do not clear the object, but retains the values of #' all fields. diff --git a/R/ggd.file.R b/R/ggd.file.R index 09b2232..03dc804 100644 --- a/R/ggd.file.R +++ b/R/ggd.file.R @@ -10,7 +10,7 @@ # Functions ################################################################################################ -#' Read a composition from a CSV file +#' Read a composition #' #' Reads a CSV file recorded the composition of a \code{\link[ggd]{GGD}} object #' and generates a \code{\link[ggd]{GGD}} object. @@ -132,7 +132,7 @@ GGD$methods( ) ################################################################################################ -#' Write the composition to a CSV file +#' Write the composition #' #' Writes the composition of a \code{\link[ggd]{GGD}} object as a CSV file. #' Mean values and standard deviations of the components are recorded to a maximum length of diff --git a/R/ggd.mean.sd.R b/R/ggd.mean.sd.R index 7851f29..3385315 100644 --- a/R/ggd.mean.sd.R +++ b/R/ggd.mean.sd.R @@ -499,7 +499,7 @@ calc.v.t4.via.integrate <- function( means, sds, mean = calc.mean( 4, means, sds } ################################################################################################ -#' Adjust the median, mean and sd fields +#' Adjust median, mean and sd fields #' #' Calculates the median, the mean and the standard deviation of the distribution model and #' sets those values into the fields. diff --git a/R/ggd.nls.freq.R b/R/ggd.nls.freq.R index 244f529..384614b 100644 --- a/R/ggd.nls.freq.R +++ b/R/ggd.nls.freq.R @@ -301,7 +301,7 @@ #' You know a standard deviation must be a non-zero positive value. #' But if you use standard deviations directly in the formula for \code{\link[stats]{nls}}, #' they will sometimes drop into negative values while the Gauss-Newton algorithm is running -#' and the algorithm will fail, even if it can reach to convergence if done better. +#' and the algorithm will fail, even if it can reach convergence if done better. #' #' So, to avoid such failures, we use square roots of standard deviations and #' take squares of them in the formula for \code{\link[stats]{nls}}. @@ -1123,7 +1123,7 @@ extract.freq.data <- function( data, x, freq ) data.ext <- extract.complete.x.y( data, x, freq, "freq" ) if ( nrow( data.ext ) < 3 ) { - stop( "Error: The row number of data is too small." ) + stop( "Error: Too few rows for data." ) } # Check if rows are sorted. @@ -1298,14 +1298,14 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star # but closer to mean of the frequency distribution than "means". # These are used when we do not want the initial mean values to be dispersed. # - # sqrt.sd.mid: + # sqrt.sds.mid: # Global or local standard deviation corresponding to around center of the range of # the frequency distribution. if ( is.na( start.level ) ) { # Level NA: all parameters are NA. means.mid <- means <- rep( NA_real_, 4 ) - sqrt.sd.mid <- sqrt.sds <- rep( NA_real_, 4 ) + sqrt.sds.mid <- sqrt.sds <- rep( NA_real_, 4 ) mean.lower <- mean.upper <- mean.inner <- mean.outer <- NA_real_ sqrt.sd.lower <- sqrt.sd.upper <- sqrt.sd.inner <- sqrt.sd.outer <- NA_real_ @@ -1320,7 +1320,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star sqrt.sd.lower <- sqrt.sd.upper <- sqrt.sd.inner <- sqrt.sd.outer <- sqrt( data.sd ) means.mid <- rep( data.mean, 4 ) - sqrt.sd.mid <- sqrt( data.sd ) + sqrt.sds.mid <- sqrt( data.sd ) } else if ( start.level == 1 ) { @@ -1352,7 +1352,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star }, 0 ) means.mid <- rep( data.mean, 4 ) - sqrt.sd.mid <- sqrt( data.sd ) + sqrt.sds.mid <- sqrt( data.sd ) } else if ( start.level >= 2 ) { @@ -1381,7 +1381,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star sqrt.sd.outer <- sqrt( ( ms[[1]]$sd + ms[[4]]$sd ) / 2 ) means.mid <- rep( data.mean, 4 ) - sqrt.sd.mid <- sqrt( data.sd ) + sqrt.sds.mid <- sqrt( data.sd ) if ( start.level == 3 ) { @@ -1393,7 +1393,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star c( sep$data[[1]][lengths[1]], sep$data[[4]][1] ) ) means.mid <- rep( ms$mean, 4 ) - sqrt.sd.mid <- sqrt( ms$sd ) + sqrt.sds.mid <- sqrt( ms$sd ) } else { @@ -1437,7 +1437,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star { means.mid <- means <- obj$cmp$mean[c( 1, 2, 4, 3 )] sqrt.sds <- sqrt( obj$cmp$sd[c( 1, 2, 4, 3 )] ) - sqrt.sd.mid <- ( sqrt.sds[2] + sqrt.sds[3] ) / 2 + sqrt.sds.mid <- ( sqrt.sds[2] + sqrt.sds[3] ) / 2 } else { @@ -1454,7 +1454,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star sqrt.sd.inner <- sqrt.sds[2] sqrt.sd.outer <- sqrt.sds[1] - sqrt.sd.mid <- sqrt.sds[2] + sqrt.sds.mid <- sqrt.sds[2] } } } @@ -1466,7 +1466,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star # via Normal Distribution fm <- d ~ dnorm( x, mean, sqrt.sd^2 ) - start <- list( mean = means.mid[1], sqrt.sd = sqrt.sd.mid ) + start <- list( mean = means.mid[1], sqrt.sd = sqrt.sds.mid ) } else { @@ -1478,7 +1478,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star fm <- d ~ ( dnorm( x, mean.1, sqrt.sd^2 ) + dnorm( x, mean.2, sqrt.sd^2 ) ) / 2 start <- list( mean.1 = mean.lower, mean.2 = mean.upper, - sqrt.sd = sqrt.sd.mid ) + sqrt.sd = sqrt.sds.mid ) } else if ( eq.mean ) { @@ -1507,7 +1507,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star start <- list( mean.1 = mean.lower, mean.2 = mean.upper, - sqrt.sd = sqrt.sd.mid ) + sqrt.sd = sqrt.sds.mid ) } else if ( eq.mean ) { @@ -1543,7 +1543,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star start <- list( mean.1 = mean.outer, mean.2 = mean.inner, - sqrt.sd = sqrt.sd.mid ) + sqrt.sd = sqrt.sds.mid ) } else if ( eq.mean ) { @@ -1576,7 +1576,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star start <- list( mean.1 = means[1], mean.2 = mean.inner, mean.3 = means[4], - sqrt.sd = sqrt.sd.mid ) + sqrt.sd = sqrt.sds.mid ) } else if ( eq.mean ) { @@ -1620,7 +1620,7 @@ get.nls.params <- function( x, freq, total, mix.type, grad, eq.mean, eq.sd, star mean.1.2 = means[2], mean.2.1 = means[4], mean.2.2 = means[3], - sqrt.sd = sqrt.sd.mid ) + sqrt.sd = sqrt.sds.mid ) } else if ( eq.mean ) { diff --git a/R/ggd.set.cmp.R b/R/ggd.set.cmp.R index 37f6bba..5442503 100644 --- a/R/ggd.set.cmp.R +++ b/R/ggd.set.cmp.R @@ -396,7 +396,7 @@ GGD$methods( ) ################################################################################################ -#' Adjust the cmp field +#' Adjust cmp field #' #' Simplifies the components in \code{cmp} field with retaining #' the substance of the distribution. Also, you can make \code{cmp} field redundant inversely. diff --git a/R/ggd.trace.q.R b/R/ggd.trace.q.R index 75ce76d..13bde87 100644 --- a/R/ggd.trace.q.R +++ b/R/ggd.trace.q.R @@ -581,7 +581,7 @@ GGD$methods( mix.type.seq <- c( mix.type, mix.type.seq[mix.type.seq != mix.type] ) - # In order to attempt to retain number of rows of cmp field when mix.type = 3, + # In order to attempt to retain number of rows in cmp field when mix.type = 3, # make sequences of values to set grad values. if ( mix.type == 3 && nrow( cmp ) == 2 ) { diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..25225ae --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,57 @@ +── R CMD check results ─────────────────────────────── ggd 1.0.2 ──── +Duration: 16m 4.6s + +0 errors ✔ | 0 warnings ✔ | 0 notes ✔ + +── ggd 1.0.2: NOTE + + Build ID: ggd_1.0.2.tar.gz-9d7128aae7ec4518843c9e66b3186d41 + Platform: Windows Server 2022, R-devel, 64 bit + Submitted: 47m 50.5s ago + Build time: 30m 21.8s + +❯ checking CRAN incoming feasibility ... NOTE + Maintainer: 'Kimitsuna Ura ' + + New submission + +❯ checking HTML version of manual ... [11s] NOTE + Skipping checking math rendering: package 'V8' unavailable + +❯ checking for non-standard things in the check directory ... NOTE + Found the following files/directories: + ''NULL'' + +❯ checking for detritus in the temp directory ... NOTE + Found the following files/directories: + 'lastMiKTeXException' + +0 errors ✔ | 0 warnings ✔ | 4 notes ✖ + +── ggd 1.0.2: NOTE + + Build ID: ggd_1.0.2.tar.gz-6cc10ab775894ac9b324ce8825dfac5f + Platform: Ubuntu Linux 20.04.1 LTS, R-release, GCC + Submitted: 47m 50.5s ago + Build time: 36m 44.5s + +❯ checking CRAN incoming feasibility ... [6s/16s] NOTE + Maintainer: ‘Kimitsuna Ura ’ + + New submission + +0 errors ✔ | 0 warnings ✔ | 1 note ✖ + +── ggd 1.0.2: NOTE + + Build ID: ggd_1.0.2.tar.gz-1656b971e4eb45e5bb4a7d465c518026 + Platform: Fedora Linux, R-devel, clang, gfortran + Submitted: 47m 50.6s ago + Build time: 36m 33.4s + +❯ checking CRAN incoming feasibility ... [6s/20s] NOTE + Maintainer: ‘Kimitsuna Ura ’ + + New submission + +0 errors ✔ | 0 warnings ✔ | 1 note ✖ diff --git a/man/GGD-class.Rd b/man/GGD-class.Rd index 1df66d4..46ade7c 100644 --- a/man/GGD-class.Rd +++ b/man/GGD-class.Rd @@ -224,8 +224,8 @@ The class provides the Gradational Gaussian Distribution. \item{\code{mix.type}}{An integer which represents how to mix normal distributions of the components. - The type of the distribution model and the row number of \code{cmp} - field will be as follows with this value: + The type of the distribution model and the number of rows + in \code{cmp} field will be as follows with this value: \itemize{ \item \code{0} : Normal distribution. \code{cmp} has only 1 row. diff --git a/man/adjust.cmp.Rd b/man/adjust.cmp.Rd index 588219b..ed4f1a1 100644 --- a/man/adjust.cmp.Rd +++ b/man/adjust.cmp.Rd @@ -3,7 +3,7 @@ \name{adjust.cmp} \alias{adjust.cmp} \alias{\S4method{adjust.cmp}{GGD}} -\title{Adjust the cmp field} +\title{Adjust cmp field} \usage{ \S4method{adjust.cmp}{GGD}(this.mix.type = NULL, grad = c("default", "normal", "h", "v", "v2", "v3", "hv")) diff --git a/man/adjust.cmp.rownames.Rd b/man/adjust.cmp.rownames.Rd index c66e4c8..753c4a0 100644 --- a/man/adjust.cmp.rownames.Rd +++ b/man/adjust.cmp.rownames.Rd @@ -3,7 +3,7 @@ \name{adjust.cmp.rownames} \alias{adjust.cmp.rownames} \alias{\S4method{adjust.cmp.rownames}{GGD}} -\title{Adjust each row name of the cmp field.} +\title{Adjust each row name of cmp} \usage{ \S4method{adjust.cmp.rownames}{GGD}() } diff --git a/man/adjust.kind.index.Rd b/man/adjust.kind.index.Rd index add3a00..338eda6 100644 --- a/man/adjust.kind.index.Rd +++ b/man/adjust.kind.index.Rd @@ -3,7 +3,7 @@ \name{adjust.kind.index} \alias{adjust.kind.index} \alias{\S4method{adjust.kind.index}{GGD}} -\title{Adjust the kind.index field} +\title{Adjust kind and kind.index fields} \usage{ \S4method{adjust.kind.index}{GGD}() } diff --git a/man/adjust.median.mean.sd.Rd b/man/adjust.median.mean.sd.Rd index d870546..0fe61e8 100644 --- a/man/adjust.median.mean.sd.Rd +++ b/man/adjust.median.mean.sd.Rd @@ -3,7 +3,7 @@ \name{adjust.median.mean.sd} \alias{adjust.median.mean.sd} \alias{\S4method{adjust.median.mean.sd}{GGD}} -\title{Adjust the median, mean and sd fields} +\title{Adjust median, mean and sd fields} \usage{ \S4method{adjust.median.mean.sd}{GGD}() } diff --git a/man/apply.cmp.Rd b/man/apply.cmp.Rd index c1e264a..d474aab 100644 --- a/man/apply.cmp.Rd +++ b/man/apply.cmp.Rd @@ -3,7 +3,7 @@ \name{apply.cmp} \alias{apply.cmp} \alias{\S4method{apply.cmp}{GGD}} -\title{Apply functions to elements of cmp} +\title{Apply functions to cmp} \usage{ \S4method{apply.cmp}{GGD}(f.mean = NULL, f.sd = NULL) } @@ -55,7 +55,7 @@ Each function indicated with \code{f.mean} or \code{f.sd} can receive (e.g., \code{\link[ggd]{adjust.cmp}}, \code{\link[ggd]{round.cmp}}, etc.) for the object of the 2nd argument, since they may update the values of the fields. - This function does not change the number of rows of the \code{cmp} field, + This function does not change the number of rows in \code{cmp} field, no matter what results are obtained. } \examples{ diff --git a/man/clear.Rd b/man/clear.Rd index d1fab04..d102436 100644 --- a/man/clear.Rd +++ b/man/clear.Rd @@ -12,7 +12,7 @@ The cleared \code{\link[ggd]{GGD}} object itself (invisible). } \description{ Clears all fields. The lengths of all vector fields and the number of rows -in the \code{cmp} field will be \code{0}. +in \code{cmp} field will be \code{0}. } \examples{ a <- GGD$new() diff --git a/man/ggd.kind.Rd b/man/ggd.kind.Rd index 61742e9..613784c 100644 --- a/man/ggd.kind.Rd +++ b/man/ggd.kind.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ggd.1.R \name{ggd.kind} \alias{ggd.kind} -\title{String of the kind of distribution} +\title{String of the kind} \usage{ ggd.kind(objs) } diff --git a/man/ggd.kind.index.Rd b/man/ggd.kind.index.Rd index a163bd4..4b5b39c 100644 --- a/man/ggd.kind.index.Rd +++ b/man/ggd.kind.index.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ggd.1.R \name{ggd.kind.index} \alias{ggd.kind.index} -\title{Index number of the kind of distribution} +\title{Index number of the kind} \usage{ ggd.kind.index(objs, undef.err = FALSE) } diff --git a/man/ggd.mix.type.for.Rd b/man/ggd.mix.type.for.Rd index 3960c01..c0a66a4 100644 --- a/man/ggd.mix.type.for.Rd +++ b/man/ggd.mix.type.for.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ggd.1.R \name{ggd.mix.type.for} \alias{ggd.mix.type.for} -\title{Get mix.type according to grad} +\title{mix.type according to grad} \usage{ ggd.mix.type.for( grad = c("default", "normal", "h", "v", "v2", "v3", "hv"), diff --git a/man/ggd.mix.type.for.kind.index.Rd b/man/ggd.mix.type.for.kind.index.Rd index 7809222..70e400e 100644 --- a/man/ggd.mix.type.for.kind.index.Rd +++ b/man/ggd.mix.type.for.kind.index.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ggd.1.R \name{ggd.mix.type.for.kind.index} \alias{ggd.mix.type.for.kind.index} -\title{Get mix.type according to kind.index} +\title{mix.type according to kind.index} \usage{ ggd.mix.type.for.kind.index(kind.index) } diff --git a/man/ggd.ncmp.for.Rd b/man/ggd.ncmp.for.Rd index 6184d46..90a3af7 100644 --- a/man/ggd.ncmp.for.Rd +++ b/man/ggd.ncmp.for.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ggd.1.R \name{ggd.ncmp.for} \alias{ggd.ncmp.for} -\title{Get number of components according to the grad value and others} +\title{Number of components according to grad} \usage{ ggd.ncmp.for( grad = c("default", "normal", "h", "v", "v2", "v3", "hv"), diff --git a/man/is.h.Rd b/man/is.h.Rd index 9cbd6b6..9f29a54 100644 --- a/man/is.h.Rd +++ b/man/is.h.Rd @@ -3,7 +3,7 @@ \name{is.h} \alias{is.h} \alias{\S4method{is.h}{GGD}} -\title{Judge if horizontal gradational distribution} +\title{Judge if horizontal} \usage{ \S4method{is.h}{GGD}(strict = FALSE) } @@ -19,7 +19,7 @@ otherwise \code{FALSE}. } \description{ -Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially a horizontal gradational distribution. When \code{mix.type = 4}, if it is essentially a horizontal gradational distribution, this function returns \code{TRUE}. diff --git a/man/is.hv.Rd b/man/is.hv.Rd index ad1c17f..19899fd 100644 --- a/man/is.hv.Rd +++ b/man/is.hv.Rd @@ -3,7 +3,7 @@ \name{is.hv} \alias{is.hv} \alias{\S4method{is.hv}{GGD}} -\title{Judge if horizontal-vertical gradation} +\title{Judge if horizontal-vertical} \usage{ \S4method{is.hv}{GGD}(strict = FALSE) } @@ -21,7 +21,7 @@ 4 (2x2) normal distributions, otherwise \code{FALSE}. } \description{ -Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially a horizontal-vertical gradation of 4 (2x2) normal distributions. } \examples{ diff --git a/man/is.normal.Rd b/man/is.normal.Rd index 627431b..12c57a1 100644 --- a/man/is.normal.Rd +++ b/man/is.normal.Rd @@ -3,7 +3,7 @@ \name{is.normal} \alias{is.normal} \alias{\S4method{is.normal}{GGD}} -\title{Judge if normal distribution} +\title{Judge if normal} \usage{ \S4method{is.normal}{GGD}() } @@ -11,7 +11,7 @@ \code{TRUE} if the object shows a normal distribution, otherwise \code{FALSE}. } \description{ -Referring only \code{cmp} field, checks if the distribution is a normal distribution. +Referring \code{cmp} field, checks if the distribution is essentially a normal distribution. Note, this function does not check \code{kind} and \code{kind.index} fields. } \examples{ diff --git a/man/is.symmetric.Rd b/man/is.symmetric.Rd index bba85d9..0bfd309 100644 --- a/man/is.symmetric.Rd +++ b/man/is.symmetric.Rd @@ -3,7 +3,7 @@ \name{is.symmetric} \alias{is.symmetric} \alias{\S4method{is.symmetric}{GGD}} -\title{Judge if symmetric distribution} +\title{Judge if symmetric} \usage{ \S4method{is.symmetric}{GGD}() } diff --git a/man/is.v2.Rd b/man/is.v2.Rd index bca0bc3..8ba44f2 100644 --- a/man/is.v2.Rd +++ b/man/is.v2.Rd @@ -3,7 +3,7 @@ \name{is.v2} \alias{is.v2} \alias{\S4method{is.v2}{GGD}} -\title{Judge if vertical gradation of 2 normal distributions} +\title{Judge if 2-component vertical} \usage{ \S4method{is.v2}{GGD}(strict = FALSE) } @@ -19,7 +19,7 @@ 2 normal distributions, otherwise \code{FALSE}. } \description{ -Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially a vertical gradation of 2 normal distributions. Even when \code{cmp} field has 3 rows with \code{mix.type = 3}, if the components of the left-tail side and the right-tail side are the same, this function returns \code{TRUE}, diff --git a/man/is.v3.Rd b/man/is.v3.Rd index 86f557c..03ea665 100644 --- a/man/is.v3.Rd +++ b/man/is.v3.Rd @@ -3,7 +3,7 @@ \name{is.v3} \alias{is.v3} \alias{\S4method{is.v3}{GGD}} -\title{Judge if vertical gradation of 3 normal distributions} +\title{Judge if 3-component vertical} \usage{ \S4method{is.v3}{GGD}(strict = FALSE) } @@ -22,7 +22,7 @@ 3 normal distributions, otherwise \code{FALSE}. } \description{ -Referring \code{mix.type} and \code{cmp} field, checks if the distribution is constructed as +Referring \code{mix.type} and \code{cmp} field, checks if the distribution is essentially a vertical gradation of 3 normal distributions. Note! when \code{mix.type = 4}, if the right-top-side and left-top-side components are the same diff --git a/man/nls.freq.Rd b/man/nls.freq.Rd index d52fc08..a2ff948 100644 --- a/man/nls.freq.Rd +++ b/man/nls.freq.Rd @@ -290,7 +290,7 @@ If necessary, outliers should be excluded by preprocessing. You know a standard deviation must be a non-zero positive value. But if you use standard deviations directly in the formula for \code{\link[stats]{nls}}, they will sometimes drop into negative values while the Gauss-Newton algorithm is running - and the algorithm will fail, even if it can reach to convergence if done better. + and the algorithm will fail, even if it can reach convergence if done better. So, to avoid such failures, we use square roots of standard deviations and take squares of them in the formula for \code{\link[stats]{nls}}. diff --git a/man/read.csv.Rd b/man/read.csv.Rd index 9ba7133..ad8d8b5 100644 --- a/man/read.csv.Rd +++ b/man/read.csv.Rd @@ -4,7 +4,7 @@ \alias{read.csv} \alias{ggd.read.csv} \alias{\S4method{read.csv}{GGD}} -\title{Read a composition from a CSV file} +\title{Read a composition} \usage{ ggd.read.csv(file) diff --git a/man/round.cmp.Rd b/man/round.cmp.Rd index 7628888..4ad5754 100644 --- a/man/round.cmp.Rd +++ b/man/round.cmp.Rd @@ -5,7 +5,7 @@ \alias{signif.cmp} \alias{\S4method{round.cmp}{GGD}} \alias{\S4method{signif.cmp}{GGD}} -\title{Rounding of numbers in cmp} +\title{Rounding values in cmp} \usage{ \S4method{round.cmp}{GGD}(dg.mean = 0, dg.sd = dg.mean) @@ -33,7 +33,7 @@ The processed \code{\link[ggd]{GGD}} object itself. Rounds the values of all elements in the \code{cmp} field and adjusts other fields accordingly. \code{\link[base]{round}} and \code{\link[base]{signif}} functions can apply. -These functions does not change the number of rows of \code{cmp} field, +These functions does not change the number of rows in \code{cmp} field, no matter what results are obtained. If an error occurs, these functions do not clear the object, but retains the values of all fields. diff --git a/man/write.csv.Rd b/man/write.csv.Rd index 6f6392b..730aaa5 100644 --- a/man/write.csv.Rd +++ b/man/write.csv.Rd @@ -4,7 +4,7 @@ \alias{write.csv} \alias{ggd.write.csv} \alias{\S4method{write.csv}{GGD}} -\title{Write the composition to a CSV file} +\title{Write the composition} \usage{ ggd.write.csv(obj, file = "") diff --git a/tests/testthat/test.nls.freq.R b/tests/testthat/test.nls.freq.R index a21f3f6..93dfdac 100644 --- a/tests/testthat/test.nls.freq.R +++ b/tests/testthat/test.nls.freq.R @@ -181,15 +181,15 @@ expect_error( a$nls.freq( df, x = 3 ), expect_cleared( a ); a <- GGD$new() expect_error( ggd.nls.freq( data.frame( x = x[1:2], freq = freq[1:2] ) ), - "The row number of data is too small" ) + "Too few rows for data" ) expect_error( a$nls.freq( data.frame( x = x[1:2], freq = freq[1:2] ) ), - "The row number of data is too small" ) + "Too few rows for data" ) expect_cleared( a ); a <- GGD$new() expect_error( ggd.nls.freq( data.frame( x = c( x[1:2], NA, x[3] ) , freq = c( freq[1:3], NaN ) ) ), - "The row number of data is too small" ) + "Too few rows for data" ) expect_error( a$nls.freq( data.frame( x = c( x[1:2], NA, x[3] ) , freq = c( freq[1:3], NaN ) ) ), - "The row number of data is too small" ) + "Too few rows for data" ) expect_cleared( a ); a <- GGD$new() expect_error( ggd.nls.freq( data.frame( x = -x, freq = -freq ), grad = "normal" ), @@ -627,11 +627,11 @@ expect_error( ggd.nls.freq.all( data.frame( x = x, p = freq ) ), expect_error( ggd.nls.freq.all( df, x = "x.2" ), "Column 'x.2' is undefined" ) expect_error( ggd.nls.freq.all( data.frame( x = x[1:2], freq = freq[1:2] ), grad = "normal" ), - "The row number of data is too small" ) + "Too few rows for data" ) expect_error( ggd.nls.freq.all( data.frame( x = x[1:2], freq = freq[1:2] ) ), - "The row number of data is too small" ) + "Too few rows for data" ) expect_error( ggd.nls.freq.all( data.frame( x = c( x[1:2], NA, x[3] ) , freq = c( freq[1:3], NaN ) ) ), - "The row number of data is too small" ) + "Too few rows for data" ) expect_error( ggd.nls.freq.all( data.frame( x = -x, freq = -freq ), grad = "normal" ), "Rows of x must have been sorted" ) expect_error( ggd.nls.freq.all( data.frame( x = c( x[1:10], x[10:21] ), freq = c( freq[1:10], freq[10:21] ) ) ),