build_outlined_strata_project | R Documentation |
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.
build_outlined_strata_project(outline)
outline |
A data frame with the following columns: project_path, stratum_name, stratum_order, lamina_name, lamina_order, skip_if_fail. |
invisible dataframe of the survey of the strata project.
The outline dataframe should have the following columns:
project_path
: The path to the project.
stratum_name
: The name of the stratum.
stratum_order
: The order of the stratum.
lamina_name
: The name of the lamina.
lamina_order
: The order of the lamina within the stratum.
skip_if_fail
: A logical indicating if the lamina should be skipped if
it fails.
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.