Skip to content

Commit

Permalink
docs!: #102 add @import* calls
Browse files Browse the repository at this point in the history
style: fix indentation and spacing #97
  • Loading branch information
egouldo committed Aug 28, 2024
1 parent a0d5b14 commit 045ec1a
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions R/get_MA_fit_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
#' @param MA_mod a fitted model of class rma.mv
#' @return A tidy tibble with \eqn{\sigma^2} and \eqn{I^2} estimates for `MA_mod`
#' @export
#' @importFrom orchaRd i2_ml
#' @importFrom purrr pluck set_names
#' @importFrom tibble as_tibble_row
#' @import dplyr
get_MA_fit_stats <- function(MA_mod) {
stopifnot("MA_mod must be an object of class rma.mv" = "rma.mv" %in% class(MA_mod))

res <- bind_cols(
pluck(MA_mod, "sigma2") %>%
set_names("sigma2_1", "sigma2_2") %>%
as_tibble_row(),
orchaRd::i2_ml(MA_mod) %>%
as_tibble_row(),
)


stopifnot("MA_mod must be an object of class `rma.mv`" = "rma.mv" %in% class(MA_mod))

res <-
bind_cols(
pluck(MA_mod, "sigma2") %>%
set_names("sigma2_1", "sigma2_2") %>%
as_tibble_row(),
orchaRd::i2_ml(MA_mod) %>%
as_tibble_row()
)

return(res)
}

0 comments on commit 045ec1a

Please sign in to comment.