Skip to contents

Create a date variable specification

Usage

mock_spec_date(
  name,
  range,
  rtype = "date",
  source_format = "analysis",
  missing_codes = character(0),
  missing_proportions = numeric(0),
  garbage_rules = list(),
  provenance = "direct",
  model_hint = "native-postprocess"
)

Arguments

name

Variable name.

range

Date vector of length two giving the inclusive valid date range.

rtype

R output type. Defaults to "date".

source_format

Source-format hint. Defaults to "analysis".

missing_codes

Explicit missing-code values.

missing_proportions

Missing-code probabilities aligned to missing_codes.

garbage_rules

List of intentional invalid-value rules.

provenance

Provenance metadata.

model_hint

Backend hint.

Value

A mock_spec_variable object.

Examples

interview_date <- mock_spec_date(
  "interview_date",
  range = as.Date(c("2001-01-01", "2005-12-31"))
)