Reads a bundle written by write_design() (a folder or .zip file),
checks each table against its checksum and restores its column types, then
runs the recorded steps with the installed version of tidycreel.
Arguments
- path
A bundle folder or
.zipfile.- ...
Tables for steps the bundle does not carry (written with
include_data = FALSE), named by their argument:counts =,interviews =, andcatch =,lengths =,ages =for the tables given toadd_catch(),add_lengths()andadd_ages().
Value
A creel_design() object.
Details
A manifest written by hand works too: list the steps and their tables, as
write_design() does. Without recorded column types, the date column of
the calendar is read as a date and other columns take the types
utils::read.csv() guesses; tables without a checksum are reported as not
verified.
Examples
data(example_calendar)
data(example_counts)
d <- creel_design(example_calendar, date = date, strata = day_type)
d <- add_counts(d, example_counts, count_col = effort_hours)
path <- file.path(tempdir(), "example-design")
write_design(d, path, overwrite = TRUE)
d2 <- read_design(path)
unlink(path, recursive = TRUE)
