Learn R Programming

rcoder (version 0.3.0)

coding: Catalog the categorical data representation in a vector

Description

A `coding` object holds a list of `code`s that map vector values to human readable labels. An abstraction of factors, this data structure is designed to be portable and not directly attached to the underlying data. Moreover, `coding` objects can be "linked" for recoding and data lineage purposes. An "empty coding" is used to represent data that has no categorical interpretation.

Usage

coding(..., .label = NULL)

empty_coding()

Value

A `coding` object that contains each `code` input

Arguments

...

A collection of `code` objects

.label

A label for this coding, available for interoperability

Examples

Run this code
coding(code("Yes", 1), code("No", 0), code("Not applicable", NA))
empty_coding()

Run the code above in your browser using DataLab