Skip to content

Commit

Permalink
Suppressing warning, making example more complicated
Browse files Browse the repository at this point in the history
  • Loading branch information
ericward-noaa committed Feb 21, 2024
1 parent e5a0cc9 commit c82b045
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/fitting.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' y <- matrix(runif(99,1,4), ncol=3)
#' design <- data.frame("fac" = sample(letters[1:5], size=nrow(y), replace=TRUE))
#' design$fac <- as.factor(design$fac)
#' fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y, chains = 1, iter = 100)
#' fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y, chains = 1, iter = 1000)
#'
fit_zoid <- function(formula = NULL,
design_matrix,
Expand Down Expand Up @@ -70,7 +70,7 @@ fit_zoid <- function(formula = NULL,
est_re <- FALSE
re_group_names <- NA
if (!is.null(formula)) {
model_frame <- model.frame(formula, design_matrix)
model_frame <- suppressWarnings(model.frame(formula, design_matrix))
model_matrix <- model.matrix(formula, model_frame)
# extract the random effects
res <- parse_re_formula(formula, design_matrix)
Expand Down
2 changes: 1 addition & 1 deletion R/get_pars.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#'
#' @examples
#' \donttest{
#' y <- matrix(c(3.77, 6.63, 2.60, 0.9, 1.44, 0.66, 2.10, 3.57, 1.33),
#' y <- matrix(c(3.77, 6.63, 2.60, 0.9, 1.44, 0.66, 2.10, 3.57, 1.33, 3.4, 1.4, 5),
#' nrow = 3, byrow = TRUE
#' )
#' # fit a model with no covariates
Expand Down

0 comments on commit c82b045

Please sign in to comment.