
Extract input data from qlm_coded objects
inputs.RdExtracts the original input data (texts or image paths) from qlm_coded
objects. The inputs are the source material that was coded, constituting
a core component of the coded object.
Value
The original input data: a character vector of texts (for text codebooks) or file paths to images (for image codebooks). If the original input had names, these are preserved.
Details
The inputs are a core component of coded objects, representing the source
material that was coded. Like codebook(), this is a component extractor
rather than a metadata accessor.
The function name mirrors the inputs argument in qlm_code(), providing
a direct conceptual mapping: what is passed in via inputs = is retrieved
back via inputs().
See also
accessors for an overview of the accessor function system
qlm_code()for creating coded objectscodebook()for extracting the codebookqlm_meta()for extracting metadata
Examples
# Load example objects
examples <- readRDS(system.file("extdata", "example_objects.rds", package = "quallmer"))
coded <- examples$example_coded_sentiment
# Extract inputs
texts <- inputs(coded)
texts
#> [1] "I absolutely loved this movie! Best film I've seen all year."
#> [2] "Terrible experience. Would not recommend to anyone."
#> [3] "It was okay, nothing special but not bad either."
#> [4] "Amazing performance by the lead actor. Truly inspiring."
#> [5] "Disappointing. The plot made no sense and acting was poor."