Learn R Programming

quallmer (version 0.4.0)

codebook: Extract codebook from quallmer objects

Description

Extracts the codebook component from qlm_coded, qlm_comparison, and qlm_validation objects. The codebook is a constitutive part of the coding run, defining the coding instrument used.

Usage

codebook(x)

Value

A qlm_codebook object, or NULL if no codebook is available.

Arguments

x

A quallmer object (qlm_coded, qlm_comparison, or qlm_validation).

Details

The codebook is a core component of coded objects, analogous to formula() for lm objects. It specifies the coding instrument (instructions, schema, role) used in the coding run.

This function is an extractor for the codebook component, not a metadata accessor. For codebook metadata (name, instructions), use qlm_meta().

Note: qlm_codebook() is the constructor for creating codebooks; codebook() is the extractor for retrieving them from coded objects.

See Also

  • accessors for an overview of the accessor function system

  • qlm_codebook() for creating codebooks

  • qlm_meta() for extracting metadata

  • inputs() for extracting input data

Examples

Run this code
# Load example objects
examples <- readRDS(system.file("extdata", "example_objects.rds", package = "quallmer"))
coded <- examples$example_coded_sentiment

# Extract codebook
cb <- codebook(coded)
cb

# Access codebook metadata
qlm_meta(cb, "name")

Run the code above in your browser using DataLab