Codes form a tree: pass parent (id or label) to create a sub-code.
Inductive codes can simply be added without a parent while coding.
Examples
qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
#> # A tibble: 1 × 5
#> id name format chars status
#> <int> <chr> <chr> <int> <chr>
#> 1 1 interview_01.txt txt 856 ok
qda_code_add("Career path") # top level
qda_code_add("SME", parent = "Career path") # subcode (inherits the colour)
qda_code_add("Motivation", color = "#56B4E9", description = "Reasons and drives")
qda_codes()
#> # A tibble: 3 × 9
#> id label parent_id color description anchor coding_rule path n_codings
#> <int> <chr> <int> <chr> <chr> <chr> <chr> <chr> <int>
#> 1 1 Career p… NA #E69… "" "" "" Care… 0
#> 2 2 SME 1 #E69… "" "" "" Care… 0
#> 3 3 Motivati… NA #56B… "Reasons a… "" "" Moti… 0
qda_close()