Skip to content

Commit c82b045

Browse files
committed
Suppressing warning, making example more complicated
1 parent e5a0cc9 commit c82b045

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

R/fitting.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#' y <- matrix(runif(99,1,4), ncol=3)
4242
#' design <- data.frame("fac" = sample(letters[1:5], size=nrow(y), replace=TRUE))
4343
#' design$fac <- as.factor(design$fac)
44-
#' fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y, chains = 1, iter = 100)
44+
#' fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y, chains = 1, iter = 1000)
4545
#'
4646
fit_zoid <- function(formula = NULL,
4747
design_matrix,
@@ -70,7 +70,7 @@ fit_zoid <- function(formula = NULL,
7070
est_re <- FALSE
7171
re_group_names <- NA
7272
if (!is.null(formula)) {
73-
model_frame <- model.frame(formula, design_matrix)
73+
model_frame <- suppressWarnings(model.frame(formula, design_matrix))
7474
model_matrix <- model.matrix(formula, model_frame)
7575
# extract the random effects
7676
res <- parse_re_formula(formula, design_matrix)

R/get_pars.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#'
1919
#' @examples
2020
#' \donttest{
21-
#' y <- matrix(c(3.77, 6.63, 2.60, 0.9, 1.44, 0.66, 2.10, 3.57, 1.33),
21+
#' 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),
2222
#' nrow = 3, byrow = TRUE
2323
#' )
2424
#' # fit a model with no covariates

0 commit comments

Comments
 (0)