diff --git a/DESCRIPTION b/DESCRIPTION index ecb3613..2a67113 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,9 +15,11 @@ Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Imports: ale, + cli, dplyr, mgcv, purrr, + rlang, staccuracy, stats, stringr diff --git a/NAMESPACE b/NAMESPACE index af92104..9973ee5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,9 +1,8 @@ # Generated by roxygen2: do not edit by hand S3method(anova,autogam) -S3method(cooks.distance,autogam) +S3method(coef,autogam) S3method(formula,autogam) -S3method(influence,autogam) S3method(logLik,autogam) S3method(model.matrix,autogam) S3method(plot,autogam) diff --git a/R/autogam.R b/R/autogam.R index 7de48ec..9834fdf 100644 --- a/R/autogam.R +++ b/R/autogam.R @@ -82,7 +82,7 @@ autogam <- function( #' print.autogam <- function(x, ...) { # Call mgcv:::print.gam - mgcv:::print.gam(x$gam, ...) + mgcv::print.gam(x$gam, ...) # Print basic performance measures if (x$params$y_type == 'numeric') { @@ -117,7 +117,7 @@ print.autogam <- function(x, ...) { #' @method plot autogam #' plot.autogam <- function(x, ...) { - mgcv:::plot.gam(x$gam, ...) + mgcv::plot.gam(x$gam, ...) } @@ -125,14 +125,14 @@ plot.autogam <- function(x, ...) { #' #' This function returns a summary of an `autogam` object. It calls the `mgcv::gam` object [mgcv::summary.gam()] method. #' -#' @param x An object of class \code{autogam}. +#' @param object An object of class \code{autogam}. #' @param ... Additional arguments passed to other methods. #' @return Same return object as [mgcv::summary.gam()]. #' @export #' @method summary autogam #' -summary.autogam <- function(x, ...) { - mgcv:::summary.gam(x$gam, ...) +summary.autogam <- function(object, ...) { + mgcv::summary.gam(object$gam, ...) } @@ -148,46 +148,54 @@ summary.autogam <- function(x, ...) { #' @name autogam generic methods #' @rdname generic-method #' -#' @param x An object of class \code{autogam}. +#' @param x,model An object of class \code{autogam}. #' @param ... Additional arguments passed to other methods. #' @return Returns the return object of the corresponding `mgcv::gam` method. #' @export #' @method anova autogam #' anova.autogam <- function(x, ...) { - mgcv:::anova.gam(x$gam, ...) + mgcv::anova.gam(x$gam, ...) } #' @rdname generic-method #' @export -#' @method cooks.distance autogam -cooks.distance.autogam <- function(x, ...) { - mgcv:::cooks.distance.gam(x$gam, ...) +#' @method coef autogam +coef.autogam <- function(x, ...) { + stats::coef(x$gam, ...) } +#' #' @rdname generic-method +#' #' @export +#' #' @method cooks.distance autogam +#' cooks.distance.autogam <- function(model, ...) { +#' mgcv:::cooks.distance.gam(model$gam, ...) +#' } + + #' @rdname generic-method #' @export #' @method formula autogam formula.autogam <- function(x, ...) { - mgcv:::formula.gam(x$gam, ...) + mgcv::formula.gam(x$gam, ...) } -#' @rdname generic-method -#' @export -#' @method influence autogam -influence.autogam <- function(x, ...) { - mgcv:::influence.gam(x$gam, ...) -} +#' #' @rdname generic-method +#' #' @export +#' #' @method influence autogam +#' influence.autogam <- function(model, ...) { +#' mgcv::influence.gam(model$gam, ...) +#' } #' @rdname generic-method #' @export #' @method logLik autogam logLik.autogam <- function(x, ...) { - mgcv:::logLik.gam(x$gam, ...) + mgcv::logLik.gam(x$gam, ...) } @@ -195,7 +203,7 @@ logLik.autogam <- function(x, ...) { #' @export #' @method model.matrix autogam model.matrix.autogam <- function(x, ...) { - mgcv:::model.matrix.gam(x$gam, ...) + mgcv::model.matrix.gam(x$gam, ...) } @@ -203,7 +211,7 @@ model.matrix.autogam <- function(x, ...) { #' @export #' @method predict autogam predict.autogam <- function(x, ...) { - mgcv:::predict.gam(x$gam, ...) + mgcv::predict.gam(x$gam, ...) } @@ -211,7 +219,7 @@ predict.autogam <- function(x, ...) { #' @export #' @method residuals autogam residuals.autogam <- function(x, ...) { - mgcv:::residuals.gam(x$gam, ...) + mgcv::residuals.gam(x$gam, ...) } @@ -219,6 +227,6 @@ residuals.autogam <- function(x, ...) { #' @export #' @method vcov autogam vcov.autogam <- function(x, ...) { - mgcv:::vcov.gam(x$gam, ...) + mgcv::vcov.gam(x$gam, ...) } diff --git a/man/generic-method.Rd b/man/generic-method.Rd index 2255fac..ce36eee 100644 --- a/man/generic-method.Rd +++ b/man/generic-method.Rd @@ -3,9 +3,8 @@ \name{autogam generic methods} \alias{autogam generic methods} \alias{anova.autogam} -\alias{cooks.distance.autogam} +\alias{coef.autogam} \alias{formula.autogam} -\alias{influence.autogam} \alias{logLik.autogam} \alias{model.matrix.autogam} \alias{predict.autogam} @@ -15,12 +14,10 @@ \usage{ \method{anova}{autogam}(x, ...) -\method{cooks.distance}{autogam}(x, ...) +\method{coef}{autogam}(x, ...) \method{formula}{autogam}(x, ...) -\method{influence}{autogam}(x, ...) - \method{logLik}{autogam}(x, ...) \method{model.matrix}{autogam}(x, ...) @@ -32,7 +29,7 @@ \method{vcov}{autogam}(x, ...) } \arguments{ -\item{x}{An object of class \code{autogam}.} +\item{x, model}{An object of class \code{autogam}.} \item{...}{Additional arguments passed to other methods.} } diff --git a/man/summary.autogam.Rd b/man/summary.autogam.Rd index 62d92fd..261e114 100644 --- a/man/summary.autogam.Rd +++ b/man/summary.autogam.Rd @@ -4,10 +4,10 @@ \alias{summary.autogam} \title{Summary Method for autogam Objects} \usage{ -\method{summary}{autogam}(x, ...) +\method{summary}{autogam}(object, ...) } \arguments{ -\item{x}{An object of class \code{autogam}.} +\item{object}{An object of class \code{autogam}.} \item{...}{Additional arguments passed to other methods.} }