Skip to content

Commit

Permalink
add example for estimates_exist; closes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
thegargiulian committed Feb 6, 2024
1 parent 13aeaab commit 197df7c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions R/estimate_mse.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,22 @@ run_lcmcr <- function(stratum_data_prepped, stratum_name, min_n = 1,
#' full file path to the JSON file containing the estimates, otherwise it will
#' be `NA`.
#' @export
#' @importFrom dplyr "%>%"
#'
#' @examples
#' \dontrun{
#' in_A <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.45, 0.65))
#' in_B <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.5, 0.5))
#' in_C <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.75, 0.25))
#' in_D <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(1, 0))
#'
#' my_stratum <- tibble::tibble(in_A, in_B, in_C, in_D) %>%
#' dplyr::mutate(rs = rowSums(.)) %>%
#' dplyr::filter(rs >= 1) %>%
#' dplyr::select(-rs)
#'
#' estimates_exist(stratum_data_prepped = my_stratum, estimates_dir = "path_to_estimates")
#' }

estimates_exist <- function(stratum_data_prepped, estimates_dir) {

Expand Down
15 changes: 15 additions & 0 deletions man/estimates_exist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 197df7c

Please sign in to comment.