Skip to content

create_var_from_codelist throws error when strict==TRUE and input is numeric #99

@LiamHobby

Description

@LiamHobby

When the input variable is numeric and there are values that do not appear in the codelist the code that executes on line 187 throws an error rather than generating the cli warning. This is because it cannot determine the length to use for the glue substitution (i.e., value{?s}).

The cli call requires the use of qty() prior to each instance of glue substitution. See codelists.R line 284-289 for an example of how this should look like.

Reproducible example
create_var_from_codelist_bug.txt

Metadata

Metadata

Assignees

Labels

0.3.0Issues to be worked on for release 0.3.0 (est. Jan 2026).bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions