R/tidy.R

Defines functions tidy.crumble

Documented in tidy.crumble

#' @importFrom generics tidy
#' @export
generics::tidy

#' Tidy a(n) crumble object
#'
#' @param x A `crumble` object produced by a call to [crumble::crumble()].
#' @param ... Unused, included for generic consistency only.
#'
#' @return A tidy [tibble::tibble()] summarizing information about the model.
#'
#' @example inst/examples/examples.R
#'
#' @importFrom purrr list_rbind map
#'
#' @export
tidy.crumble <- function(x, ...) {
	out <- list_rbind(map(x$estimates, ife::tidy), names_to = "estimand")
	class(out) <- c("tbl_df", "tbl", "data.frame")
	out
}

Try the crumble package in your browser

Any scripts or data that you put into this service are public.

crumble documentation built on April 13, 2025, 5:10 p.m.