From 045ec1aef4c0c0ed632b682f482163a60a3469be Mon Sep 17 00:00:00 2001 From: egouldo Date: Thu, 29 Aug 2024 01:04:41 +1000 Subject: [PATCH] docs!: #102 add `@import*` calls style: fix indentation and spacing #97 --- R/get_MA_fit_stats.R | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/R/get_MA_fit_stats.R b/R/get_MA_fit_stats.R index eef8b9e..7cb2310 100644 --- a/R/get_MA_fit_stats.R +++ b/R/get_MA_fit_stats.R @@ -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) }