diff --git a/R/hermite_estimator_bivar.R b/R/hermite_estimator_bivar.R index 58396da..8740e0f 100644 --- a/R/hermite_estimator_bivar.R +++ b/R/hermite_estimator_bivar.R @@ -330,7 +330,7 @@ update_sequential_bivar_helper <- function(h_est_obj,x){ } if (is.na(h_est_obj$exp_weight)){ h_est_obj$coeff_mat_bivar <- (h_est_obj$coeff_mat_bivar * - (h_est_obj$num_obs-1) + tcrossprod(h_x,h_y))/(h_est_obj$num_obs) + (h_est_obj$num_obs-1) + tcrossprod(h_x,h_y))/(h_est_obj$num_obs) } else { h_est_obj$coeff_mat_bivar<- h_est_obj$coeff_mat_bivar * (1-h_est_obj$exp_weight) + tcrossprod(h_x,h_y)*h_est_obj$exp_weight @@ -485,8 +485,8 @@ dens.hermite_estimator_bivar <- function(h_est_obj,x, clipped = FALSE, #' Creates an object summarizing the bivariate PDF with associated generic #' methods print and plot. #' -#' The hermite_estimator_bivar object, x must be updated with observations prior -#' to the use of the method. +#' The hermite_estimator_bivar object, x must be updated with observations +#' prior to the use of the method. #' #' @param x A hermite_estimator_bivar object. #' @param x_lower A numeric vector. This vector determines the lower limit of diff --git a/R/utils_general.R b/R/utils_general.R index df8f77f..3b0d07e 100644 --- a/R/utils_general.R +++ b/R/utils_general.R @@ -2,7 +2,6 @@ #' on a hermite_estimator_univar object. #' #' Mirrors the print method of the stats::ecdf function -#' #' #' @param x A hcdf_univar object. #' @param digits A numeric value. Number of digits to round to. @@ -113,7 +112,7 @@ print.hcdf_bivar <- function (x, #' @export plot.hcdf_bivar <- function (x, main="Hermite CDF",xlab = "X", ylab="Y",...) { - z = matrix(x$cum_prob_vals,byrow = FALSE,nrow=length(x$x_vals_1)) + z <- matrix(x$cum_prob_vals,byrow = FALSE,nrow=length(x$x_vals_1)) filled.contour(x = x$x_vals_1,y = x$x_vals_2, z= z, color.palette = function(n) hcl.colors(n, "Oslo", rev = TRUE), main=main,xlab=xlab,ylab=ylab) @@ -231,7 +230,7 @@ print.hdensity_bivar <- function (x, plot.hdensity_bivar <- function(x, main="Hermite PDF",xlab = "X", ylab = "Y", ...) { - z = matrix(x$density_vals,byrow = FALSE,nrow=length(x$x_vals_1)) + z <- matrix(x$density_vals,byrow = FALSE,nrow=length(x$x_vals_1)) cols <- hcl.colors(10, "Oslo") filled.contour(x = x$x_vals_1,y = x$x_vals_2, z= z, color.palette = function(n) hcl.colors(n, "Oslo", rev = TRUE), @@ -241,9 +240,9 @@ plot.hdensity_bivar <- function(x, main="Hermite PDF",xlab = "X", ylab = "Y", #' A wrapper around the stats::cor function adding two additional methods, #' namely method = "hermite.spearman" and method = "hermite.kendall" (can be #' abbreviated). The input parameters and output value semantics closely match -#' the stats::cor method for easy interchange. If neither the "hermite.spearman" -#' nor the "hermite.kendall" method is selected, then this function will call -#' stats::cor with the arguments provided. +#' the stats::cor method for easy interchange. If neither the +#' "hermite.spearman" nor the "hermite.kendall" method is selected, then this +#' function will call stats::cor with the arguments provided. #' #' @param x a numeric vector, matrix or data frame. #' @param y NULL (default) or a vector, matrix or data frame with diff --git a/cran-comments.md b/cran-comments.md index 703a4cc..1b4a0a7 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -23,15 +23,15 @@ plot and summary generics. ## Test environments * local R installation, Windows 10, R 4.3.0 * Ubuntu Linux 20.04.1 LTS, R-release, GCC (r-hub) -* Debian Linux, R-devel, GCC ASAN/UBSAN (r-hub) +* Debian Linux, R-release, GCC (r-hub) * Fedora Linux, R-devel, clang, gfortran (r-hub) -* macOS 10.13.6 High Sierra, R-release, brew +* macOS 10.13.6 High Sierra, R-release, brew (r-hub) * Windows Server 2022, R-devel, 64 bit (r-hub) * win-builder (devel, release. oldrel) ## R CMD check results -There was 1 NOTE across environments: +There was 1 NOTE across all environments: GNU make is a SystemRequirements. @@ -39,8 +39,18 @@ GNU make is a SystemRequirements. problematic. GNU make has been added to SystemRequirements in the Description file. -* In addition, on Ubuntu 20.04.1 LTS, the package -appears to be slightly larger than 5MB, around 5.9 MB. This does not +* In addition, on Debian and Ubuntu Linux, the package +appears to be slightly larger than 5MB, around 5.2- 6 MB. This does not appear to occur on any of the other environments however (i.e. Fedora Linux, Windows, MacOS) +* Finally, there is the following note on Ubuntu and Fedora Linux: + +* checking HTML version of manual ... NOTE +Skipping checking HTML validation: no command 'tidy' found +Skipping checking math rendering: package 'V8' unavailable + +This seems build system specific and not directly tied to the package. + +* There is also a PREPERROR for Debian Linux, R-devel, GCC ASAN/UBSAN on rhub +- we believe this is an issue on the build server and not package specific. diff --git a/man/cor.Rd b/man/cor.Rd index 4792d12..506958f 100644 --- a/man/cor.Rd +++ b/man/cor.Rd @@ -5,9 +5,9 @@ \title{A wrapper around the stats::cor function adding two additional methods, namely method = "hermite.spearman" and method = "hermite.kendall" (can be abbreviated). The input parameters and output value semantics closely match -the stats::cor method for easy interchange. If neither the "hermite.spearman" -nor the "hermite.kendall" method is selected, then this function will call -stats::cor with the arguments provided.} +the stats::cor method for easy interchange. If neither the +"hermite.spearman" nor the "hermite.kendall" method is selected, then this +function will call stats::cor with the arguments provided.} \usage{ cor(x, y = NULL, use = "everything", method = "pearson", ...) } @@ -35,7 +35,7 @@ object if method is "hermite.spearman" or "hermite.kendall".} A wrapper around the stats::cor function adding two additional methods, namely method = "hermite.spearman" and method = "hermite.kendall" (can be abbreviated). The input parameters and output value semantics closely match -the stats::cor method for easy interchange. If neither the "hermite.spearman" -nor the "hermite.kendall" method is selected, then this function will call -stats::cor with the arguments provided. +the stats::cor method for easy interchange. If neither the +"hermite.spearman" nor the "hermite.kendall" method is selected, then this +function will call stats::cor with the arguments provided. } diff --git a/man/density.hermite_estimator_bivar.Rd b/man/density.hermite_estimator_bivar.Rd index 66631af..36b4e2d 100644 --- a/man/density.hermite_estimator_bivar.Rd +++ b/man/density.hermite_estimator_bivar.Rd @@ -31,6 +31,6 @@ estimates. N: The number of terms N in the Hermite series estimator. } \description{ -The hermite_estimator_bivar object, x must be updated with observations prior -to the use of the method. +The hermite_estimator_bivar object, x must be updated with observations +prior to the use of the method. } diff --git a/tests/testthat/test_utilities_general.R b/tests/testthat/test_utilities_general.R index dc68639..d6a2bc8 100644 --- a/tests/testthat/test_utilities_general.R +++ b/tests/testthat/test_utilities_general.R @@ -457,7 +457,7 @@ test_that("quantile, median and IQR generics work correctly", { hermite_est <- hermite_estimator(observations = test_observations, standardize = TRUE) quantiles_est <- quantile(hermite_est) - target_quantiles = c(-14.64905596, + target_quantiles <- c(-14.64905596, -1.57302308, 0.04009478, 1.01244707,