Learn R Programming

DCC (version 1.2.1)

dcc_mapping_findings: Mapping problems found while aligning forms

Description

Returns the mapping-problem findings attached by dcc_map_forms. This is the public accessor; callers should not read the hidden attribute directly.

Usage

dcc_mapping_findings(x)

Value

A dcc_findings table (possibly empty) of mapping problems (unknown forms, missing source items).

Arguments

x

A dcc_data returned by dcc_map_forms.

Examples

Run this code
data <- data.frame(sid = c("S1", "S2"), form = c("A", "B"),
                   p1 = c(1, 2), p2 = c(5, 6))
fmap <- data.frame(form = c("A", "A", "B", "B"),
                   source = c("p1", "p2", "p1", "p2"),
                   master = c("M001", "M002", "M003", "M002"),
                   is_anchor = c(FALSE, TRUE, FALSE, TRUE))
mapped <- dcc_map_forms(data, fmap, form_var = "form")
dcc_mapping_findings(mapped)

Run the code above in your browser using DataLab