link_codings | R Documentation |
Coding objects can be linked together to create mappings from one or more codings to another. This creates a 'data.frame' that outlines how the codings are linked, to be used in 'make_recode_query()'.
link_codings(to, ..., .to_suffix = "to", .drop_unused = FALSE)
to |
A coding to be linked to |
... |
Codings to be linked from |
.to_suffix |
A suffix signifying which columns in the output 'data.frame' came from 'to' |
.drop_unused |
Logical flag to drop any codes in '...' that have no counterparts in 'to' |
A 'linked_coding_df' with all necessary information for a recoding query
wave1 <- coding(
code("Yes", 1),
code("No", 2),
code("Refused", -88, missing = TRUE)
)
wave2 <- coding(
code("Yes", "y"),
code("No", "n"),
code("Missing", ".", missing = TRUE)
)
link_codings(
to = coding(
code("Yes", 1),
code("No", 0),
code("Missing", NA, links_from = c("Refused", "Missing"))
),
wave1,
wave2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.