Skip to contents

Move a code to a new parent (re-parent), e.g. after drag & drop in the app

Usage

qda_code_move(code, parent = NULL)

Arguments

code

Code id or label to move.

parent

New parent code id/label, or NULL to move to the top level.

Value

Invisibly, a one-row tibble with the updated code.

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")
qda_code_add("SME", parent = "Career path")
qda_code_add("Motivation")
qda_code_move("SME", parent = "Motivation")
qda_code_move("SME", parent = NULL)   # back to the top level
qda_codes()$path
#> [1] "Career path" "SME"         "Motivation" 
qda_close()