Learn R Programming

DCC (version 1.2.1)

dcc_data: The dcc_data container

Description

A dcc_data object bundles the dataset with its metadata, the level-0 read report, and an append-only provenance chain. Every DCC stage (detect, execute, report) receives and returns this container; stages append to the provenance chain and never rewrite it (raw data is immutable; cleaning produces new versions).

Usage

dcc_data(data, meta = list(), read_report = NULL, provenance = NULL,
  dictionary = NULL, missing_states = NULL, import_spec = NULL)

Value

An object of class dcc_data: a list with elements data

(a data.table), meta, read_report, provenance, dictionary, missing_states, and import_spec.

Arguments

data

A data.frame or data.table.

meta

Named list of source metadata (see dcc_read).

read_report

A dcc_read_report object, or NULL.

provenance

List of provenance records; normally created internally.

dictionary

Canonical variable dictionary with unique name values.

missing_states

Cell-level missing-state table using DCC's declared missing-state vocabulary.

import_spec

The dcc_import_spec that produced the canonical data, or NULL for data created directly in R.

Examples

Run this code
x <- dcc_data(data.frame(id = 1:3, score = c(90, 85, 77)))
dcc_provenance(x)

Run the code above in your browser using DataLab