Take over the other coder's codings of one unit (consensus coding)
Source:R/intercoder_adopt.R
qda_intercoder_adopt.RdAfter discussing a disagreement, the coding of coder B can be copied into
the active project: all of B's codings of code that overlap the unit
start–end of document source are added with B's exact character
range (the documents are identical). Codings A already has (same code,
same range) are skipped. The codes must exist in the active project
(same path). All new codings form one action: Ctrl+Z / qda_undo()
removes them again. The other file is not changed.
Usage
qda_intercoder_adopt(
other,
source,
start,
end,
code,
level = c("code", "top"),
min_overlap = 1L
)Arguments
- other
Path to the second coder's
.jellyqdafile.- source
Document of the active project (id or name).
- start, end
The unit, as in
qda_intercoder_diff().- code
Code path (with
level = "top": path of the top-level code; then B's codings of the whole family are taken over).- level
"code"(every code and subcode on its own) or"top"(a code together with all its subcodes, i.e. code families).- min_overlap
Minimum number of characters a coding must overlap a unit to count.
Examples
dir <- tempfile()
qda_open(file.path(dir, "coder_a.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("Team")
b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda"))
qda_close()
qda_open(b); qda_code(1, "Team", segment = 4); qda_close()
qda_open(file.path(dir, "coder_a.jellyqda"))
d <- qda_intercoder_diff(b)
qda_intercoder_adopt(b, d$source_id[1], d$start[1], d$end[1], d$code[1])
qda_codings()[, c("code", "start", "end")]
#> # A tibble: 1 × 3
#> code start end
#> <chr> <int> <int>
#> 1 Team 328 370
qda_close()