Skip to content

Commit 63e31c0

Browse files
committed
Merge branch 'main' of github.com:HRDAG/verdata
2 parents c28f822 + 197df7c commit 63e31c0

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

R/estimate_mse.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,22 @@ run_lcmcr <- function(stratum_data_prepped, stratum_name, min_n = 1,
160160
#' full file path to the JSON file containing the estimates, otherwise it will
161161
#' be `NA`.
162162
#' @export
163+
#' @importFrom dplyr "%>%"
164+
#'
165+
#' @examples
166+
#' \dontrun{
167+
#' in_A <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.45, 0.65))
168+
#' in_B <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.5, 0.5))
169+
#' in_C <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.75, 0.25))
170+
#' in_D <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(1, 0))
171+
#'
172+
#' my_stratum <- tibble::tibble(in_A, in_B, in_C, in_D) %>%
173+
#' dplyr::mutate(rs = rowSums(.)) %>%
174+
#' dplyr::filter(rs >= 1) %>%
175+
#' dplyr::select(-rs)
176+
#'
177+
#' estimates_exist(stratum_data_prepped = my_stratum, estimates_dir = "path_to_estimates")
178+
#' }
163179

164180
estimates_exist <- function(stratum_data_prepped, estimates_dir) {
165181

man/estimates_exist.Rd

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)