Skip to contents

A convenience wrapper around dl_read() for reading a single design object from the standardized datalake structure under "designs/{model_type}".

Usage

dl_read_design(
  model_type = c("conjoint", "maxdiff", "segmentation", "brand", "list_experiment",
    "appraise", "other"),
  name = NULL,
  version = NULL,
  wave = NULL,
  verbose = TRUE,
  project = dl_get_project(),
  env = "prod"
)

Arguments

model_type

Character scalar defining the model category. Must be one of "conjoint", "maxdiff", "segmentation", "brand", "list_experiment", "appraise" or "other".

name

Optional character scalar defining the design name. Can be NULL.

version

Optional character scalar defining the design version. Can be NULL.

wave

Optional character scalar defining the survey wave.

verbose

Logical. If TRUE, prints information about the process. Default is TRUE.

project

Character scalar defining the project name. If NULL, inferred from DESCRIPTION file (Package field).

env

Environment of the datalake to use. Must be "prod" or "test". Defaults to "prod". "prod" writes to g6tr-dl, "test" to g6tr-dl-test.

Value

The deserialized design object read from S3.

Details

Ensures consistent design retrieval based on model_type, name, and version tags. Always returns a single design object.

Examples

if (FALSE) { # \dontrun{
# Read a conjoint design from test datalake
conjoint_design <- dl_read_design(
  model_type = "conjoint",
  name = "us_consumer_v1",
  version = "2025_01",
  env = "test",
  project = "bastion"
)
} # }