Skip to content

Commit

Permalink
debugging error messages in from package
Browse files Browse the repository at this point in the history
  • Loading branch information
johannespiller committed Sep 18, 2024
1 parent e5afe01 commit 463ef44
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion R/add-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ add_term <- function(

#' Create model matrix from model object
#' @param object a model object
#' @keywords internal
make_X <- function(object, ...) {

UseMethod("make_X", object)

}

#' @inherit make_X
#' @keywords internal
make_X.default <- function(object, newdata, ...) {

X <- model.matrix(object$formula[-2], data = newdata, ...)
Expand Down Expand Up @@ -940,7 +942,7 @@ get_sim_cumu <- function(newdata, ...) {
}

#' Add transition probabilities confidence intervals
#' @export
#' @keywords internal
add_trans_ci <- function(newdata, object, n_sim=100L, alpha=0.05, ...) {

X <- predict.gam(object, newdata = newdata, type = "lpmatrix")
Expand Down
4 changes: 2 additions & 2 deletions R/ggplot-extensions.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#' @seealso
#' \code{\link[ggplot2]{geom_ribbon}} \code{geom_stepribbon}
#' inherits from \code{geom_ribbon}.
#' @inheritParams ggplot2:::geom_ribbon
#' @inheritParams ggplot2:::geom_step
#' @inheritParams ggplot2::geom_ribbon
#' @inheritParams ggplot2::geom_step
#' @examples
#' library(ggplot2)
#' huron <- data.frame(year = 1875:1972, level = as.vector(LakeHuron))
Expand Down
1 change: 1 addition & 0 deletions R/warnings.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ warn_about_new_time_points <- function(object, newdata, ...) {
}

#' @inherit warn_about_new_time_points
#' @keywords internal
warn_about_new_time_points.glm <- function(object, newdata, time_var, ...) {

is_pam <- (inherits(object, "gam" ) | inherits( object, "scam"))
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ reference:
- ped_info
- make_newdata
- get_intervals
- add_counterfactual_transitions
- title: "Extract information from PAMMs"
desc: "Functions that help extract information from fitted model objects,
e.g., smooth effects for plotting"
Expand Down
1 change: 1 addition & 0 deletions man/add_trans_ci.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/make_X.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/make_X.default.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/warn_about_new_time_points.glm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 463ef44

Please sign in to comment.