build_outlined_strata_project {strata}R Documentation

Build a strata project from an outline dataframe

Description

Users with a specific idea in mind already can map out the intended project structure in an outline dataframe and use build_outlined_strata_project() to build the project using the dataframe as a blueprint.

Usage

build_outlined_strata_project(outline)

Arguments

outline

A data frame with the following columns: project_path, stratum_name, stratum_order, lamina_name, lamina_order, skip_if_fail.

Value

invisible dataframe of the survey of the strata project.

Outline

The outline dataframe should have the following columns:

Each row of the outline dataframe represents a stratum and lamina combination to be created in the project. A Placeholder R script will be created in each lamina directory to help remind the user to replace it with their own code.

There can only be those 6 columns, and there can be no missing values in the dataframe. The stratum_name and stratum_order columns must contain unique values.

Examples

tmp <- fs::dir_create(fs::file_temp())
outline <- tibble::tibble(
  project_path = tmp,
  stratum_name = c("test1", "test2"),
  stratum_order = c(1, 2),
  lamina_name = c("lamina1", "lamina1"),
  lamina_order = c(1, 2),
  skip_if_fail = FALSE
)
result <- build_outlined_strata_project(outline)
dplyr::glimpse(result)
main(tmp)
fs::dir_delete(tmp)

[Package strata version 1.4.5 Index]