Package 'jellyqda'

Title: 'RStudio'-Native, Fully Offline Coding of Interview Transcripts
Description: Qualitative data analysis ('QDA') of interview transcripts, field notes and open survey answers on your own computer, completely offline. Supports deductive and inductive coding with codes and subcodes, coding guidelines (definition, anchor example, coding rule), memos, segments by speaker turns, the summarizing qualitative content analysis of Mayring (2014) <https://nbn-resolving.org/urn:nbn:de:0168-ssoar-395173>, word frequencies, keyword in context, case comparisons and code queries (AND, OR, NOT). Cases can span several documents or parts of a document (e.g. the participants of a group interview) and have their own variables. Intercoder agreement between two coders is measured with Cohen's kappa (Cohen 1960) <doi:10.1177/001316446002000104>, Brennan and Prediger's kappa (Brennan and Prediger 1981) <doi:10.1177/001316448104100307> and Krippendorff's alpha (Hayes and Krippendorff 2007) <doi:10.1080/19312450709336664>, with a blind project copy and consensus coding, and team members' project copies can be merged. Graphics (code co-occurrence heatmap, code network, document portraits) are plain 'SVG'; projects can be exported in the 'REFI-QDA' exchange format for other 'QDA' software. Text is imported from plain text, 'Markdown', 'Word' and 'PDF' files or from survey tables ('CSV', 'Excel'), optionally pseudonymised, and frozen at import, so character offsets never drift. All project data lives in a single 'SQLite' file; every action is recorded in an audit trail and can be undone. A local 'shiny' app with an English and a German user interface and a scriptable API that returns tibbles share the same project file.
Authors: Shelly Pröhl [aut, cre]
Maintainer: Shelly Pröhl <[email protected]>
License: MIT + file LICENSE
Version: 0.11.0
Built: 2026-11-30 16:54:45 UTC
Source: https://github.com/thedivingshellyfish/jellyqda

Help Index


Start the jellyqda app (local Shiny UI) for the active project

Description

Launches a local Shiny app on ⁠127.0.0.1⁠ (loopback only – fully offline) and opens it in the RStudio Viewer pane when running inside RStudio. The layout shows all panes at once: document tree, code system, document browser (mark text with the mouse, then click a code button or the memo button to store the coding at the exact character offsets), retrieved segments per selected code, and the memo panel.

Usage

qda_app(
  host = "127.0.0.1",
  port = NULL,
  open = TRUE,
  new_window = TRUE,
  lang = NULL
)

Arguments

host

Host to bind; loopback only, default "127.0.0.1".

port

Port; NULL picks a random free port.

open

Logical; open the app at all.

new_window

Logical; open the app in a new browser window (default, recommended – the RStudio Viewer pane is small). With new_window = FALSE it opens inside the RStudio Viewer pane instead.

lang

User interface language, "en" or "de". NULL (default) uses qda_language() (option jellyqda.lang or the system locale). The language can also be switched in the app (EN/DE button).

Details

The call blocks the console while the app runs (press Esc to stop), like any Shiny app. Open the printed URL in additional browser windows/tabs for a multi-window setup – all windows share the same session and project.

Requires the suggested packages shiny, bslib and fontawesome (install once; runtime needs no internet).

Value

Invisibly NULL (after the app is stopped).

Examples

if (interactive()) {
  qda_open(file.path(tempfile(), "example.jellyqda"))
  qda_app()                    # new browser window; Esc stops the app
  qda_app(lang = "de")         # German user interface
  qda_app(new_window = FALSE)  # inside the RStudio Viewer pane
}

Code every occurrence of a search term

Description

Finds pattern (plain text, not a regular expression) in the documents and codes either the match itself or the whole segment containing it. Places already coded with this code (same range) are skipped. All new codings form one action: one undo removes them all again. Useful for deductive codes that are tied to clear terms – and for a first pass that is then checked by hand.

Usage

qda_autocode(
  pattern,
  code,
  scope = c("match", "segment"),
  source = NULL,
  ignore_case = TRUE,
  whole_word = FALSE,
  memo = ""
)

Arguments

pattern

Search term (plain text).

code

Code id or unique label.

scope

"match" (only the found words) or "segment" (the whole segment, e.g. the speaker turn, around each match).

source

Optional source(s) (ids or names); default all.

ignore_case

Logical.

whole_word

Logical; only whole words (default: also inside words).

memo

Optional comment for every new coding.

Value

Invisibly, a tibble of the new codings.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Project")
qda_autocode("project", code = "Project")                      # the matches
qda_autocode("project", code = "Project", scope = "segment")   # whole segments
qda_codings()[, c("code", "start", "end")]
qda_close()

Create a timestamped zip backup of the project

Description

Zips the .jellyqda project file (and the ⁠originals/⁠ directory, if present) into a timestamped .zip. The default backup directory is ⁠jellyqda-backups/⁠ outside the project folder, so a backup survives a broken project directory (a project lying directly in R's temporary folder, as in the examples, keeps them inside its folder instead, so nothing is left behind there). Old backups are rotated: only the newest keep snapshots are kept.

Usage

qda_backup(path = NULL, keep = 10, quiet = FALSE, auto = FALSE)

Arguments

path

Backup directory. Defaults to ⁠jellyqda-backups/⁠ next to the parent of the project folder.

keep

How many snapshots to keep (rotation).

quiet

Suppress the message.

auto

Internal: called by the auto-snapshot mechanism.

Details

An automatic snapshot is also taken after every auto_snapshot logged actions (see qda_open()).

Value

Invisibly, the path of the written zip file.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
zip_file <- qda_backup(quiet = TRUE)
basename(zip_file)
# own backup folder and number of backups to keep:
qda_backup(path = file.path(tempfile(), "my-backups"), keep = 20, quiet = TRUE)
qda_close()

Create a case

Description

A case is the unit you want to compare – a person, a group, an organisation. It can consist of several whole documents (a person interviewed twice) or of passages (the speaker turns of one participant in a group interview, see qda_cases_from_speakers()). Codings count for a case when they lie in one of its documents or passages.

Usage

qda_case_add(name, sources = NULL, description = "")

Arguments

name

Unique name of the case.

sources

Optional documents (ids or names) that belong to the case as a whole.

description

Optional short description.

Value

Invisibly, the new case as one-row tibble (see qda_cases()).

See Also

qda_case_assign(), qda_case_set_var(), qda_cases_from_variable()

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_case_add("Team North", sources = 1, description = "Project team, site North")
qda_cases()
qda_close()

Assign documents or passages to a case

Description

Without start/end/segment the whole document belongs to the case. With start and end (character positions, 1-based, as in qda_code()) or segment (segment numbers) only these passages belong to it – e.g. the turns of one participant in a group interview. A document can belong to several cases. Assigning the same thing twice is ignored.

Usage

qda_case_assign(case, source, start = NULL, end = NULL, segment = NULL)

Arguments

case

Case id or name.

source

Document (id or name).

start, end

Optional passage (character positions, inclusive).

segment

Optional segment number(s) of the document.

Value

Invisibly, the members of the case (see qda_case_members()).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_case_add("Person A")
qda_case_assign("Person A", 1)                   # the whole first interview
qda_case_assign("Person A", 2, segment = c(3, 5)) # two turns of the second
qda_case_members("Person A")
qda_close()

Delete a variable of a case

Description

Delete a variable of a case

Usage

qda_case_del_var(case, key)

Arguments

case

Case id or name.

key

Variable name.

Value

Invisibly, the remaining variables of the case.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_case_add("Person A")
qda_case_set_var("Person A", "age", "34")
qda_case_del_var("Person A", "age")
qda_case_vars("Person A")
qda_close()

Delete a case

Description

Removes the case and its assignments. The documents, codings and memos stay untouched. Can be undone with qda_undo().

Usage

qda_case_delete(case)

Arguments

case

Case id or name.

Value

Invisibly, TRUE.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_case_add("P1")
qda_case_delete("P1")
qda_cases()
qda_close()

Case comparison: codes x values of a document variable

Description

Counts codings per code (rows, in code-tree order) and per value of a document variable (columns), e.g. by = "Rolle". Codes count their subcodes as well (column with_subcodes). Documents without the variable are collected in the column (ohne).

Usage

qda_case_matrix(by = NULL, percent = FALSE, unit = c("document", "case"))

Arguments

by

Name of a document variable (see qda_source_set_var()) or, with unit = "case", of a case variable (see qda_case_set_var()). With unit = "case" it may be NULL: one column per case.

percent

Logical; column percentages (share of all codings of the group) instead of counts.

unit

"document" (default) or "case".

Details

With unit = "case" the columns are cases instead of documents (see qda_case_add()): one column per case, or – with by – one column per value of a case variable. A coding counts for a case when it lies in one of the case's documents or passages; a coding that belongs to two cases of the same group counts once.

Value

A tibble: code, path, depth, then one column per value (or case). Attribute "n_units": number of documents (or cases) per column.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_source_set_var(1, "role", "project lead")
qda_source_set_var(2, "role", "developer")
qda_code_add("Motivation")
qda_code(1, "Motivation", segment = 2)
qda_code(2, "Motivation", segment = 1)
qda_case_matrix("role")
qda_case_matrix("role", percent = TRUE)
qda_case_add("Person A", sources = 1:2)              # one person, two interviews
qda_case_matrix(unit = "case")
qda_close()

What belongs to a case

Description

What belongs to a case

Usage

qda_case_members(case)

Arguments

case

Case id or name.

Value

A tibble, one row per member: id, source_id, source, start, end (NA for a whole document), chars and text (the passage; for whole documents the first 200 characters).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_case_add("Person A")
qda_case_assign("Person A", 1, segment = 2)
qda_case_members("Person A")
qda_close()

Set a variable of a case

Description

Set a variable of a case

Usage

qda_case_set_var(case, key, value)

Arguments

case

Case id or name.

key

Variable name (e.g. "age").

value

Value (stored as text).

Value

Invisibly, all variables of the case.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_case_add("Person A")
qda_case_set_var("Person A", "role", "nurse")
qda_case_set_var("Person A", "age", 34)
qda_case_vars("Person A")
qda_close()

Take documents or passages out of a case

Description

Take documents or passages out of a case

Usage

qda_case_unassign(case, source = NULL, member = NULL)

Arguments

case

Case id or name.

source

Optional document (id or name): everything of this document is taken out of the case.

member

Optional member ids (column id of qda_case_members()).

Value

Invisibly, the remaining members of the case.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_case_add("Person A", sources = 1:2)
qda_case_unassign("Person A", source = 2)
qda_case_members("Person A")
qda_close()

Rename a case or change its description

Description

Rename a case or change its description

Usage

qda_case_update(case, name = NULL, description = NULL)

Arguments

case

Case id or name.

name

New name (optional).

description

New description (optional).

Value

Invisibly, the case as one-row tibble.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_case_add("P1")
qda_case_update("P1", name = "Person 1", description = "nurse, night shifts")
qda_cases()
qda_close()

Variables of a case

Description

Variables of a case

Usage

qda_case_vars(case)

Arguments

case

Case id or name.

Value

Named character vector (variable name -> value).

See Also

qda_case_set_var(), qda_source_vars() for document variables

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_case_add("Person A")
qda_case_set_var("Person A", "age", "34")
qda_case_vars("Person A")
qda_close()

List the cases of the project

Description

List the cases of the project

Usage

qda_cases()

Value

A tibble with one row per case: id, name, description, documents (number of documents with at least a part in the case), passages (number of passages, i.e. parts of documents), sources (names of the documents, comma-separated) and one column per case variable.

See Also

qda_case_add(), qda_case_vars(), qda_case_matrix()

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_case_add("Person A", sources = 1:2)   # interviewed twice
qda_cases()
qda_close()

One case per speaker of a group interview

Description

For group interviews and focus groups: every speaker label found at the start of a segment ("B1: ...", "[00:03:10] Anna: ...") becomes a case that contains all turns of this speaker. Segment the document by speaker turns first (qda_segments_set() with "speaker", or import with segments = "speaker"). Interviewer labels are left out. The case variable document records where the speaker comes from.

Usage

qda_cases_from_speakers(
  source,
  exclude = c("I", "Int", "Interviewer", "Interviewerin", "Moderation", "Mod", "M"),
  prefix = TRUE
)

Arguments

source

Document (id or name) – or several.

exclude

Speaker labels that are not cases (interviewer, moderator).

prefix

If TRUE (default) the case name starts with the document name ("group_1 - B1"), so that B1 of two groups are different cases. With FALSE the label alone is the name – then the same person can collect turns from several documents.

Value

Invisibly, the touched cases (see qda_cases()).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
f <- file.path(tempdir(), "group.txt")
writeLines(c("I: How do you organise the shifts?", "B1: We plan them together.",
             "B2: Mostly the manager does it.", "B1: But we can swap."), f)
qda_import(f, segments = "speaker")
qda_cases_from_speakers(1)
qda_cases()
qda_close()

One case per value of a document variable

Description

For several documents per case: give the documents a variable that names the case (e.g. person = "P07" on both interviews of P07), then this function creates one case per value and assigns the documents as a whole. The variable is also set on the case, so qda_case_matrix(by = key, unit = "case") works right away.

Usage

qda_cases_from_variable(key)

Arguments

key

Name of the document variable.

Value

Invisibly, the touched cases (see qda_cases()).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md", "interview_03.docx"),
                       package = "jellyqda"))
qda_source_set_var(1, "person", "P1"); qda_source_set_var(2, "person", "P1")
qda_source_set_var(3, "person", "P2")
qda_cases_from_variable("person")
qda_cases()
qda_close()

Close the active project

Description

Writes a final project_close event and disconnects from the SQLite file.

Usage

qda_close()

Value

Invisibly NULL.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_close()

Assign a code to a passage of a source

Description

Address a passage either by segment number (as shown in qda_view()) or by explicit 1-based character offsets start/end into the frozen text. Offsets are validated against the frozen text, so a coding can never point outside the source.

Usage

qda_code(source, code, segment = NULL, start = NULL, end = NULL, memo = "")

Arguments

source

Source id or unique name.

code

Code id or unique label.

segment

Segment number (see qda_view()). Mutually exclusive with start/end.

start, end

1-based inclusive character offsets into the frozen text.

memo

Optional memo attached to this coding.

Value

Invisibly, a one-row tibble describing the new coding.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(source = 1, segment = 2, code = "Career path")
qda_code(source = "interview_01.txt", start = 120, end = 200,
         code = "SME", memo = "5 years in an SME")
qda_codings()
qda_close()

Add a code to the codebook

Description

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.

Usage

qda_code_add(label, parent = NULL, color = NULL, description = "")

Arguments

label

Code label. Unique per parent.

parent

Optional parent code (id or unique label).

color

Highlight color; a palette color is assigned automatically if omitted.

description

Optional description of the code.

Value

Invisibly, a one-row tibble describing the new code.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
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()
qda_close()

Delete a code (and its sub-codes and their codings)

Description

Delete a code (and its sub-codes and their codings)

Usage

qda_code_delete(code)

Arguments

code

Code id or unique label.

Value

Invisibly, a one-row tibble with the number of deleted codes and codings.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_code_delete("Career path")   # with its subcodes and codings
nrow(qda_codes())
qda_undo()                       # everything is back
nrow(qda_codes())
qda_close()

Set the coding guideline of a code (definition, anchor example, rule)

Description

The three columns of a coding guideline ("Kodierleitfaden") as used in qualitative content analysis (Mayring, Kuckartz): a definition of the category, one or more anchor examples (typical passages) and a coding rule (how to decide borderline cases). Arguments left NULL are not changed. The definition is stored in the column description.

Usage

qda_code_guide(
  code,
  definition = NULL,
  anchor = NULL,
  rule = NULL,
  append_anchor = FALSE
)

Arguments

code

Code id or unique label.

definition, anchor, rule

New text, or NULL to keep the current one.

append_anchor

Logical; add anchor as a further example instead of replacing the existing anchor examples.

Value

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

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code_guide("SME",
  definition = "Statements about working in a small or medium-sized enterprise",
  rule = "Only explicit statements; comparisons with corporations -> other code")
qda_code_guide("SME", anchor = "'I have worked in a small company for 5 years'",
               append_anchor = TRUE)
qda_codes()[, c("label", "description", "anchor", "coding_rule")]
qda_close()

Merge a code into another code

Description

All codings, code memos and summaries of from move to into; subcodes of from become subcodes of into (a subcode with the same label as an existing subcode of into is merged into it as well). The guideline texts are kept (appended where both codes have one). Finally from is deleted. Typical step of inductive category building: two categories turn out to mean the same. Undo restores everything in one step.

Usage

qda_code_merge(from, into)

Arguments

from

Code that disappears (id or unique label).

into

Code that remains (id or unique label).

Value

Invisibly, a one-row tibble: into, number of codings_moved.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Interest")
qda_code_add("Intrinsic")
qda_code(1, "Interest", segment = 2)
qda_code_merge("Interest", into = "Intrinsic")
qda_codings()$code
qda_undo()   # both codes are back
qda_close()

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

Description

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"))
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
qda_close()

Rename a code

Description

Rename a code

Usage

qda_code_rename(code, new_label)

Arguments

code

Code id or unique label.

new_label

New label (must be unique under the same parent).

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"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code_rename("SME", "Small company")
qda_codes()$path
qda_close()

Change the colour of a code

Description

In the app, subcodes are always shown in the colour of their top-level code; changing the colour of a top-level code therefore re-colours the whole code family. With family = TRUE (default) the stored colour of all subcodes is updated as well, so exports show the same colour.

Usage

qda_code_set_color(code, color, family = TRUE)

Arguments

code

Code id or unique label.

color

New colour as "#RRGGBB".

family

Logical; also set the colour of all subcodes.

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"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code_set_color("Career path", "#0072B2")   # whole code family
qda_codes()$color
qda_close()

List the codebook

Description

List the codebook

Usage

qda_codes()

Value

A tibble with one row per code: id, label, parent_id, color, description (definition), anchor (anchor examples), coding_rule, path (hierarchical parent / child label path) and n_codings (how many codings use this code).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_codes()
qda_close()

Delete a coding

Description

Delete a coding

Usage

qda_coding_delete(coding)

Arguments

coding

Coding id.

Value

Invisibly NULL.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_coding_delete(1)
nrow(qda_codings())
qda_close()

Change the code of an existing coding (re-code)

Description

Keeps the passage, its offsets and its comment; only the code changes. Typical use: a passage coded with a top-level code is refined to one of its subcodes (or the other way round). Undoable like every action.

Usage

qda_coding_recode(coding, code)

Arguments

coding

Coding id.

code

New code (id or unique label).

Value

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

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "Career path", segment = 2)
qda_coding_recode(1, "SME")
qda_codings()$code
qda_close()

Set / change the memo of an existing coding

Description

Set / change the memo of an existing coding

Usage

qda_coding_set_memo(coding, memo)

Arguments

coding

Coding id.

memo

New memo text.

Value

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

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_coding_set_memo(1, "Turning point in the career")
qda_codings()$memo
qda_close()

Set paraphrase and generalisation of a coding (Mayring)

Description

The steps of Mayring's summarising content analysis per coded passage: paraphrase (the content in short, own words) and generalisation (raised to the abstraction level of the analysis). The reduction step is the code itself. Arguments left NULL are not changed.

Usage

qda_coding_set_summary(coding, paraphrase = NULL, generalization = NULL)

Arguments

coding

Coding id.

paraphrase, generalization

New text or NULL.

Value

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

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_coding_set_summary(1, paraphrase = "Works in a small company",
                       generalization = "Career in an SME")
qda_codings()[, c("code", "paraphrase", "generalization")]
qda_close()

List all codings (optionally filtered)

Description

List all codings (optionally filtered)

Usage

qda_codings(source = NULL, code = NULL)

Arguments

source

Optional source id or name to filter by.

code

Optional code id or label to filter by.

Value

A tibble: id, source_id, source, code_id, code, start, end, memo, text (the coded passage extracted from the frozen text), paraphrase, generalization (Mayring summary, see qda_coding_set_summary()).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2, memo = "first job")
qda_codings()
qda_codings(code = "SME")
qda_close()

Code co-occurrence: which codes appear together, and how often

Description

Counts for every pair of codes how often they appear together: in the same segment (default, e.g. the same speaker turn), in the same document, or as overlapping codings. Typical questions: which themes are talked about together? Which categories are hard to tell apart (they are always coded together)? The result is the basis of the heatmap (qda_plot_cooccurrence()) and the code network (qda_plot_network()).

Usage

qda_cooccurrence(
  unit = c("segment", "document", "overlap"),
  level = c("code", "top"),
  source = NULL,
  min_overlap = 1L
)

Arguments

unit

"segment" (both codes in the same segment), "document" (somewhere in the same document) or "overlap" (the codings share text).

level

"code" (every code and subcode) or "top" (code families: a code together with its subcodes).

source

Optional documents (ids or names); default all.

min_overlap

Minimum number of characters a coding must overlap a unit (or, with unit = "overlap", the other coding).

Value

A tibble with one row per pair of codes that occur together, most frequent first: code_a, code_b (paths), n (units – or, with unit = "overlap", pairs of codings – with both), n_a, n_b (units with each code, or its number of codings), jaccard (n / (n_a + n_b - n): 1 = always together; NA for unit = "overlap"). Attribute "codes": one row per code (code, label, depth, color, n); attribute "info": unit, level, number of units and documents.

See Also

qda_cooccurrence_passages(), qda_plot_cooccurrence(), qda_plot_network()

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team")
qda_code(1, "Career path", segment = 5)
qda_code(1, "Motivation", start = 300, end = 420)
qda_code(1, "Motivation", segment = 7)
qda_code(1, "Team", segment = 7)
qda_cooccurrence()
qda_cooccurrence(unit = "overlap")
qda_close()

The passages where two codes occur together

Description

The units (segments or documents) that contain both codes – or, with unit = "overlap", the stretches of text where codings of the two codes overlap. This is what you read after spotting a pair in qda_cooccurrence(), the heatmap or the network.

Usage

qda_cooccurrence_passages(
  code_a,
  code_b,
  unit = c("segment", "document", "overlap"),
  level = c("code", "top"),
  source = NULL,
  min_overlap = 1L
)

Arguments

code_a, code_b

Code paths (e.g. "Career path / Small company") or unique labels; with level = "top" the top-level codes.

unit

"segment" (both codes in the same segment), "document" (somewhere in the same document) or "overlap" (the codings share text).

level

"code" (every code and subcode) or "top" (code families: a code together with its subcodes).

source

Optional documents (ids or names); default all.

min_overlap

Minimum number of characters a coding must overlap a unit (or, with unit = "overlap", the other coding).

Value

A tibble: source_id, source, segment, start, end, text.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Motivation"); qda_code_add("Team")
qda_code(1, "Motivation", segment = 7)
qda_code(1, "Team", segment = 7)
qda_cooccurrence_passages("Motivation", "Team")
qda_close()

List the audit trail (events table)

Description

Every action in a jellyqda project (import, code_add, coding_add, export, backup, ...) is logged here with a UTC timestamp – the evidence for the methods section. Export it as CSV with qda_export("audit").

Usage

qda_events()

Value

A tibble: id, action, details (JSON), created_at.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_events()
qda_close()

Export segments, codebook, codings or the audit trail

Description

Writes files into path (default: ⁠exports/⁠ next to the project file).

Usage

qda_export(what = "all", path = NULL, report_documents = TRUE)

Arguments

what

One or more of "all", "segments", "codings", "codebook", "audit", "cases", "report", "qdpx".

path

Output directory (created if missing).

report_documents

Logical; include every document with its marks in the report (TRUE, default). FALSE writes the overview only, which is much faster and smaller for large projects.

Details

  • "segments": all codings with extracted text – CSV, plus .xlsx if the writexl package is installed

  • "codings": raw codings table – CSV

  • "codebook": the code tree – CSV and .docx (via officer)

  • "audit": the full events audit trail – CSV

  • "cases": the cases with their variables and members (documents or passages) – CSV, one row per member (see qda_cases())

  • "report": a standalone HTML report – all documents with colored coding marks, the codebook, all memos and project statistics

  • "qdpx": the whole project in the REFI-QDA exchange format for MAXQDA, ATLAS.ti, NVivo, QualCoder ... (see qda_export_qdpx())

  • "all": all of the above except "qdpx" ("cases" only if the project has cases)

Value

Invisibly, a tibble of written files: file, what, rows.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
out <- qda_export("all")
basename(out$file)
qda_export("audit")   # for the methods section
qda_close()

Export the project as REFI-QDA project file (.qdpx)

Description

Writes the whole project – documents, code system with colours and coding guideline, codings with comments, memos, document variables and cases – into one .qdpx file in the REFI-QDA exchange format. MAXQDA, ATLAS.ti, NVivo, QualCoder and other programs can import it, so a jellyqda project can be continued elsewhere, shared with colleagues who use other software, or archived in an open format. Tested so far with QualCoder (automatic round trip in jellyqda-converter); not yet with real imports into MAXQDA, ATLAS.ti or NVivo.

Usage

qda_export_qdpx(path = NULL, user = NULL)

Arguments

path

File to write. Default: ⁠exports/<project>_<time>.qdpx⁠ next to the project file.

user

Name of the user shown in the other program.

Details

Document, code and project memos are written twice: as notes linked to the document, code or project (the standard way of REFI-QDA) and as text at the end of its description, because QualCoder only reads memos there. In QualCoder they appear in the memo of the file, code or project; jellyqda-converter recognises the copies and does not import them twice.

Not part of the format and therefore not exported: segments, the summary grid and the audit trail. Mayring paraphrases and generalisations are added to the comment of their coding. Positions follow the standard (characters counted from 0, end exclusive).

Value

Invisibly, the path of the written file.

References

REFI-QDA Standard, project exchange (QDA-XML project 1.0, 2019): https://www.qdasoftware.org/

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code(1, "Career path", segment = 3, memo = "first job")
f <- qda_export_qdpx(file.path(tempdir(), "example.qdpx"))
zip::zip_list(f)$filename
qda_close()

What would undo / redo do next?

Description

What would undo / redo do next?

Usage

qda_history()

Value

A list with undo and redo: each either NULL (nothing to undo/redo) or a description string such as "Coding hinzugefuegt: 'Thema A' in interview_01.txt (Zeichen 120-340)".

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_history()$undo   # what the next qda_undo() would revert
qda_close()

Import text files into the active project (text gets frozen)

Description

Reads .txt, .md, .docx and .pdf files, normalizes them to UTF-8 and stores the text permanently in the sources table (frozen_text). The original file is copied unchanged into ⁠originals/⁠ next to the project file. Files whose content hash was already imported are skipped, so text is extracted exactly once per file.

Usage

qda_import(
  files,
  copy_originals = TRUE,
  names = NULL,
  segments = c("blankline", "speaker", "line"),
  pseudonyms = NULL
)

Arguments

files

Character vector of file paths.

copy_originals

Logical; copy the original files into ⁠originals/⁠.

names

Optional character vector of display names (one per file) – e.g. the original file names when importing uploads whose temp paths are meaningless (⁠0.pdf⁠, ...). Defaults to basename(files).

segments

How the new documents are divided into segments: "blankline" (paragraphs, default), "speaker" (one segment per speaker turn, e.g. "[00:01:12] P: ...") or "line". Can be changed later with qda_segments_set(); see also qda_segment_split().

pseudonyms

Optional key list for pseudonymisation (see qda_pseudonyms()): names of people, places, organisations ... are replaced in the text – and in the document name – BEFORE the text is frozen. The key list itself is not stored in the project, and the original files are not copied to ⁠originals/⁠ (they contain the real names). Check the list first with qda_pseudonymise_preview().

Details

A different file with a name that is already taken (e.g. a/interview.txt and b/interview.txt) is imported under a unique name such as ⁠interview (2).txt⁠, so no original is ever overwritten and every source can still be addressed by its name.

PDFs without a usable text layer are imported with a warning (the original remains the source of truth; consider manual OCR, e.g. tesseract).

Value

A tibble with one row per input file: id, name, format, chars, status.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
files <- system.file("extdata", c("interview_01.txt", "interview_02.md", "interview_03.docx"),
                     package = "jellyqda")
qda_import(files)
qda_import(system.file("extdata", "fieldnotes.pdf", package = "jellyqda"),
           segments = "line")                  # one segment per line
qda_sources()
f <- file.path(tempdir(), "interview_anna.txt")
writeLines(c("I: Anna, how did you start?", "Anna: In Hamburg, with Ben."), f)
qda_import(f, pseudonyms = c("Anna" = "[Person A]", "Hamburg" = "[City 1]", "Ben" = "[Person B]"))
qda_sources()$name[5]           # the name is pseudonymised too
qda_close()

Import open answers from a survey (CSV or Excel)

Description

Turns a survey export (SoSci Survey, LimeSurvey, Qualtrics, Google Forms ... saved as CSV or Excel) into documents: one document per respondent, in it every open answer as its own segment (the question as the first line, the answer below), and chosen columns as document variables – ready for coding, case comparison and queries by group. With code_questions = TRUE every answer is already coded with a code for its question (all below one code "Fragen" / "Questions"), so you can filter and compare by question right away.

Usage

qda_import_survey(
  file,
  text = NULL,
  vars = NULL,
  id = NULL,
  sheet = 1,
  code_questions = FALSE,
  prefix = NULL,
  name = NULL,
  pseudonyms = NULL
)

Arguments

file

Path to a .csv or .xlsx file.

text

Columns with open answers. Default: as suggested by qda_survey_columns().

vars

Columns to store as document variables. Default: as suggested.

id

Column with the respondent id; default as suggested, otherwise the row number.

sheet

Excel sheet.

code_questions

Logical; code every answer with a code for its question.

prefix

Start of the document names (default: the file name), e.g. "survey" gives survey_017.

name

File name to use for ⁠originals/⁠ and the default prefix (e.g. the original name of an upload).

pseudonyms

Optional key list (see qda_pseudonyms()): names in the answers, the ids and the variable values are replaced before the text is frozen; the survey file is then not copied to ⁠originals/⁠.

Details

Empty answers are left out; respondents without any open answer are skipped. Importing the same file again skips respondents already imported. The survey file is copied to ⁠originals/⁠.

Value

Invisibly, a tibble of the new documents (id, name, format, chars, status), like qda_import(). Attribute "skipped": number of respondents without answers or already imported.

See Also

qda_survey_columns()

Examples

qda_open(file.path(tempfile(), "survey.jellyqda"))
f <- system.file("extdata", "survey_demo.csv", package = "jellyqda")
qda_survey_columns(f)
qda_import_survey(f, code_questions = TRUE)
qda_sources()[, c("name", "segments")]
qda_source_vars(1)
qda_close()

Intercoder agreement between this project and a second coder's project

Description

Compares the codings of the active project (coder A) with those of a second project file (coder B, usually made with qda_intercoder_copy()) and computes, per code and overall:

Usage

qda_intercoder(
  other,
  unit = c("segment", "document"),
  level = c("code", "top"),
  source = NULL,
  min_overlap = 1L,
  coders = NULL,
  log = TRUE
)

Arguments

other

Path to the second coder's .jellyqda file.

unit

"segment" (default) or "document".

level

"code" (every code and subcode on its own) or "top" (a code together with all its subcodes, i.e. code families).

source

Optional documents (ids or names of the active project) to compare; default all documents both projects contain.

min_overlap

Minimum number of characters a coding must overlap a unit to count.

coders

Two names for the coders; default the two file names.

log

Logical; record the result in the audit trail.

Details

  • percent agreement – share of units both coders treated alike,

  • Cohen's kappa – agreement corrected for chance (Cohen 1960), with the verbal rating after Landis & Koch (1977),

  • Brennan & Prediger's kappa – chance agreement fixed at 1/2; stable for rare codes, where Cohen's kappa is low despite high agreement,

  • Krippendorff's alpha (nominal) – common in content analysis; values from .800 are usually considered reliable, .667 to .800 allow tentative conclusions (Krippendorff 2004).

Units of analysis are the segments of the active project (e.g. speaker turns) or whole documents. A unit counts as coded with a code when a coding of that code overlaps it by at least min_overlap characters, so the two coders do not have to mark exactly the same characters. Documents are matched by their text (names may differ), codes by their path. Codes nobody used in the compared documents are left out.

The other file is only read, never changed. Each comparison is recorded in the audit trail (for the methods section) and shown in the report.

Value

A tibble with one row per code plus a first row scope = "overall" (all codes pooled): scope, code (path), units, both, only_a, only_b, neither, agreement, kappa, kappa_bp, alpha, rating, in_a, in_b (the code exists in the project of A / B). The overall row also has mean_kappa (mean over the codes). Attribute "info": coders, files, compared and missing documents, unit and level.

References

Cohen, J. (1960). A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20(1), 37–46.

Brennan, R. L., & Prediger, D. J. (1981). Coefficient kappa: Some uses, misuses, and alternatives. Educational and Psychological Measurement, 41(3), 687–699.

Landis, J. R., & Koch, G. G. (1977). The measurement of observer agreement for categorical data. Biometrics, 33(1), 159–174.

Krippendorff, K. (2004). Content Analysis: An Introduction to Its Methodology (2nd ed.). Sage.

See Also

qda_intercoder_copy(), qda_intercoder_diff(), qda_intercoder_adopt()

Examples

dir <- tempfile()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Team")
b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda"))
qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 3)
qda_close()
qda_open(b)                       # coder B codes independently
qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 4)
qda_close()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_intercoder(b)
qda_intercoder(b, level = "top", unit = "document")
qda_close()

Take over the other coder's codings of one unit (consensus coding)

Description

After 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 .jellyqda file.

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.

Value

Invisibly, a tibble of the new codings.

Examples

dir <- tempfile()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
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")]
qda_close()

Create a blind copy of the project for a second coder

Description

The first step of an intercoder check: the copy contains the same documents (frozen texts), segments, document variables and code system including the coding guideline – but no codings, no Mayring summaries, no summary grid and no audit trail, so the second person codes "blind". Code memos (definitions, coding rules) are kept by default; other memos only if requested in keep_memos. The active project is not changed.

Usage

qda_intercoder_copy(path, keep_memos = "code", overwrite = FALSE)

Arguments

path

File for the copy (the .jellyqda extension is added if missing). Must not exist yet unless overwrite = TRUE.

keep_memos

Kinds of memos to keep in the copy: any of "code", "project", "document", "passage". Default only code memos.

overwrite

Logical; replace an existing file.

Value

Invisibly, the path of the copy.

See Also

qda_intercoder() to compare both projects afterwards.

Examples

dir <- tempfile()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code(1, "Career path", segment = 2)
copy <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda"))
qda_close()
qda_open(copy)
nrow(qda_codings())   # 0: coder B starts blind
qda_codes()$label     # same code system
qda_close()

Units on which the two coders disagree

Description

Lists every unit (segment or document) and code where exactly one of the two coders coded – the material for the consensus discussion after an intercoder check. Takes the same arguments as qda_intercoder().

Usage

qda_intercoder_diff(
  other,
  unit = c("segment", "document"),
  level = c("code", "top"),
  source = NULL,
  min_overlap = 1L,
  coders = NULL,
  code = NULL
)

Arguments

other

Path to the second coder's .jellyqda file.

unit

"segment" (default) or "document".

level

"code" (every code and subcode on its own) or "top" (a code together with all its subcodes, i.e. code families).

source

Optional documents (ids or names of the active project) to compare; default all documents both projects contain.

min_overlap

Minimum number of characters a coding must overlap a unit to count.

coders

Two names for the coders; default the two file names.

code

Optional code path (or label of a top-level code) to show only its disagreements.

Value

A tibble: source_id, source, segment, start, end (the unit in the active project), code (path), coded_by ("A" or "B"), coder (name), text (text of the unit), b_codings (number of B's codings that can be taken over with qda_intercoder_adopt()).

Examples

dir <- tempfile()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Team")
b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda"))
qda_code(1, "Team", segment = 3)
qda_close()
qda_open(b); qda_code(1, "Team", segment = 4); qda_close()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_intercoder_diff(b)[, c("segment", "code", "coded_by")]
qda_close()

Keyword in context (KWIC)

Description

Every occurrence of a word or phrase with the text to its left and right – to see how a term is used across all interviews.

Usage

qda_kwic(
  pattern,
  source = NULL,
  width = 50,
  ignore_case = TRUE,
  whole_word = TRUE
)

Arguments

pattern

Word or phrase (plain text).

source

Optional source id or name.

width

Characters of context on each side.

ignore_case

Logical.

whole_word

Logical; only whole words.

Value

A tibble: source_id, source, segment, start, end, left, match, right.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_kwic("colleague", width = 30)
qda_kwic("inform", whole_word = FALSE)   # also inside words ("informatics")
qda_close()

Get or set the language of the app and the report

Description

jellyqda's user interface and the HTML report are available in English and German. By default the language follows the option jellyqda.lang or, if unset, the system locale (German locale: German, otherwise English). In the app the language can also be switched with the EN/DE button in the toolbar.

Usage

qda_language(lang = NULL)

Arguments

lang

"en" or "de" to set the language for this R session; NULL (default) only returns the current language.

Value

The current language code, invisibly when setting it.

Examples

qda_language()          # current language
old <- qda_language("de")
qda_language("en")

Code x source matrix (V1.5)

Description

Counts of codings per code (rows) and source (columns), like the MAXQDA Code Matrix Browser – in R simply a crossing table.

Usage

qda_matrix()

Value

A tibble: code plus one column per source with the counts.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_code_add("Motivation")
qda_code(1, "Motivation", segment = 2)
qda_code(2, "Motivation", segment = 1)
qda_matrix()
qda_close()

Add a memo

Description

Creates a memo of one of four kinds. The kind follows from the arguments unless given explicitly: start/end (with source) -> passage memo, only source -> document memo, code -> code memo, nothing -> project memo (as in earlier versions: qda_memo_add("text")).

Usage

qda_memo_add(
  text_,
  source = NULL,
  start = NULL,
  end = NULL,
  code = NULL,
  title = "",
  kind = NULL
)

Arguments

text_

Memo text.

source

Source id or name (passage and document memos).

start, end

1-based character offsets of the passage (passage memos).

code

Code id or label (code memos).

title

Optional short title.

kind

Optional, one of "passage", "document", "code", "project".

Value

Invisibly, a one-row tibble with the new memo.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_memo_add("Sharpen question 3 of the guide")                  # project
qda_memo_add("Calm atmosphere, interviewee nervous", source = 1)  # document
qda_memo_add("Only code explicit statements", code = "SME",
             title = "Coding rule")                                # code
qda_memo_add("Turning point?", source = 1, start = 120, end = 200)  # passage
qda_memos()
qda_close()

Delete a memo

Description

Delete a memo

Usage

qda_memo_delete(memo)

Arguments

memo

Memo id.

Value

Invisibly NULL.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
m <- qda_memo_add("A thought")
qda_memo_delete(m$id)
nrow(qda_memos())
qda_close()

Edit an existing memo

Description

Edit an existing memo

Usage

qda_memo_update(memo, text_ = NULL, title = NULL)

Arguments

memo

Memo id.

text_

New memo text (NULL = keep).

title

New title (NULL = keep).

Value

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

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
m <- qda_memo_add("A first thought")
qda_memo_update(m$id, text_ = "A better thought", title = "Idea")
qda_memos()[, c("title", "text_")]
qda_close()

List memos

Description

List memos

Usage

qda_memos(kind = NULL, source = NULL, code = NULL)

Arguments

kind

Optional filter: one or more of "passage", "document", "code", "project".

source

Optional source id/name: only memos referring to it (passage and document memos).

code

Optional code id/label: only memos of this code.

Value

A tibble: id, kind, title, text_, source_id, source, code_id, code, start, end, passage (the memo'd text for passage memos), created_at, updated_at.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_memo_add("Research diary entry")
qda_memo_add("Definition of SME", code = "SME")
qda_memos()
qda_memos(kind = "code")
qda_close()

Merge another project file into the open project

Description

Takes documents, codes, codings, memos, variables, summary grid cells and cases from another jellyqda project – typically the copy a team member coded – into the open project. Documents are recognised by their text, codes by their path; nothing that is already there is added twice, and where both projects have a different value (a variable, a summary) the open project keeps its own and the difference is counted as a conflict.

Usage

qda_merge(other, add_documents = TRUE, dry_run = FALSE, backup = TRUE)

Arguments

other

Path to the other .jellyqda file.

add_documents

Logical; also add documents that exist only in the other project (default TRUE). With FALSE their codings are skipped.

dry_run

Logical; only report what would be merged.

backup

Logical; write a backup before merging (default TRUE).

Details

Run it with dry_run = TRUE first to see what would be added. A real merge writes a backup of the open project first (qda_backup()); it is not undone with qda_undo() but by restoring that backup. The other file is only read.

Value

A tibble with one row per kind of data: what, added, already (already there, skipped) and conflicts. Attributes "file" and "dry_run".

See Also

qda_intercoder_copy() to hand out copies, qda_intercoder_adopt() to take over single codings

Examples

dir <- tempfile()
qda_open(file.path(dir, "team.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Team")
copy <- qda_intercoder_copy(file.path(dir, "anna.jellyqda"))   # a copy for Anna
qda_code(1, "Team", segment = 3)                                 # you code document 1
qda_close()
qda_open(copy)                                                   # Anna codes document 2
qda_code(2, "Career path", segment = 2); qda_code_add("Motivation")
qda_code(2, "Motivation", segment = 4)
qda_close()
qda_open(file.path(dir, "team.jellyqda"))
qda_merge(copy, dry_run = TRUE)                                  # what would happen?
qda_merge(copy)
qda_codings()[, c("source", "code")]
qda_close()

Open (or create) a jellyqda project file

Description

Opens the SQLite project file at path (created together with its schema if it does not exist yet) and makes it the active project for all other ⁠qda_*()⁠ functions. The .jellyqda extension is appended if missing.

Usage

qda_open(path, auto_snapshot = 25)

Arguments

path

Path to the project file, e.g. "meinarbeit.jellyqda".

auto_snapshot

Integer. After this many logged actions an automatic backup snapshot is written (see qda_backup()). Set to Inf to disable.

Value

Invisibly, a one-row tibble with project information (see qda_project()).

Examples

project <- file.path(tempfile(), "example.jellyqda")
qda_open(project)
qda_project()
qda_close()

Heatmap of code co-occurrence

Description

Shows qda_cooccurrence() as a triangle of code x code cells: the darker a cell, the more often the two codes occur together; the number is in the cell. Codes are in code-tree order, each with the colour of its code family. Hovering a cell shows the details; in the app a click lists the passages (qda_cooccurrence_passages()).

Usage

qda_plot_cooccurrence(
  x = NULL,
  measure = c("n", "jaccard"),
  max_codes = 30,
  file = NULL,
  ...
)

Arguments

x

Result of qda_cooccurrence(); if NULL it is computed with ....

measure

"n" (count) or "jaccard" (share of units with either code that have both; evens out frequent codes).

max_codes

Show at most this many codes (the most frequent ones).

file

Optional path: write the SVG there instead of returning it.

...

Arguments for qda_cooccurrence() (e.g. unit, level).

Value

The SVG as an HTML object (printing shows it in the RStudio Viewer), or invisibly file.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team")
qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5)
qda_code(1, "Motivation", segment = 7); qda_code(1, "Team", segment = 7)
svg <- qda_plot_cooccurrence()
qda_plot_cooccurrence(file = tempfile(fileext = ".svg"))
qda_close()

Code network: codes as circles, lines for co-occurrence

Description

Draws qda_cooccurrence() as a network: every code is a circle (colour of its code family, size = how often it was used), a line connects two codes that occur together (thicker = more often). With layout = "circle" the codes sit in code-tree order around a circle, so code families stay next to each other; layout = "force" pulls related codes together. Hovering shows the numbers; in the app a click on a line lists the passages.

Usage

qda_plot_network(
  x = NULL,
  min_n = 1L,
  layout = c("circle", "force"),
  size = 560,
  file = NULL,
  ...
)

Arguments

x

Result of qda_cooccurrence(); if NULL it is computed with ....

min_n

Draw only lines for pairs that occur together at least this often.

layout

"circle" or "force".

size

Width and height of the drawing area in pixels.

file

Optional path: write the SVG there instead of returning it.

...

Arguments for qda_cooccurrence() (e.g. unit, level).

Value

The SVG as an HTML object (printing shows it in the RStudio Viewer), or invisibly file.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team")
qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5)
qda_code(1, "Motivation", segment = 7); qda_code(1, "Team", segment = 7)
svg <- qda_plot_network()
svg <- qda_plot_network(layout = "force", level = "top")
qda_close()

Document portraits: one coloured strip per document

Description

Draws qda_portrait(): every document is a strip from its start (left) to its end (right), every segment a block as wide as its share of the text, coloured by the codes it contains. Strips of several documents underneath each other show where in the interviews the themes come up. Hovering a block names the segment and its codes; in the app a click jumps to the segment.

Usage

qda_plot_portrait(x = NULL, width = 760, interactive = TRUE, file = NULL, ...)

Arguments

x

Result of qda_portrait(); if NULL it is computed with ....

width

Width of the strips in pixels.

interactive

Logical; TRUE (default) gives every block a tooltip and a click target (app, Viewer). FALSE (used for the printed report) leaves them out and merges neighbouring segments with the same codes – the picture is the same, the file much smaller in large projects.

file

Optional path: write the SVG there instead of returning it.

...

Arguments for qda_portrait() (e.g. level, source).

Value

The SVG as an HTML object (printing shows it in the RStudio Viewer), or invisibly file.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Team")
qda_code(1, "Career path", segment = 3)
qda_code(2, "Team", segment = 5)
svg <- qda_plot_portrait()
qda_close()

Document portrait: which codes appear where in a document

Description

Walks through every document segment by segment (in text order) and lists the codes each segment contains. Drawn as a strip per document (qda_plot_portrait()), this shows at a glance where in an interview a theme comes up – at the start, throughout, only at the end – and makes interviews comparable.

Usage

qda_portrait(source = NULL, level = c("top", "code"), min_overlap = 1L)

Arguments

source

Optional documents (ids or names); default all.

level

"top" (default: code families, one colour each) or "code" (every code and subcode).

min_overlap

Minimum number of characters a coding must overlap a segment to count.

Value

A tibble with one row per segment and code (segments without codes have code = NA): source_id, source, segment, start, end, pos (share of the document before the segment, 0–1), width (share of the document the segment takes), code, color.

See Also

qda_plot_portrait()

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Motivation")
qda_code(1, "Career path", segment = 3)
qda_code(1, "Motivation", segment = 7)
qda_portrait()
qda_close()

Show information about the active project

Description

Show information about the active project

Usage

qda_project()

Value

A one-row tibble: project file, size, row counts of all tables and the default backup directory.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_project()
qda_close()

Preview a pseudonymisation

Description

Reads the files like qda_import() would and counts how often each name of the key list would be replaced – nothing is imported. Use it to check the key list: a name with 0 hits is perhaps spelled differently in the transcript.

Usage

qda_pseudonymise_preview(files, pseudonyms)

Arguments

files

Paths of .txt, .md, .docx or .pdf files.

pseudonyms

Key list, see qda_pseudonyms().

Value

A tibble: file, original, replacement, n (replacements).

Examples

f <- file.path(tempdir(), "interview_anna.txt")
writeLines(c("I: Anna, how did you start?", "Anna: In Hamburg, with Ben."), f)
qda_pseudonymise_preview(f, c("Anna" = "[Person A]", "Hamburg" = "[City 1]", "Ben" = "[Person B]"))

Read a key list for pseudonymisation

Description

A key list says which real names (people, places, organisations ...) are replaced by which placeholder. It can be

  • a CSV, TSV or Excel file with two columns: original, replacement (a header line is fine),

  • text lines like "Anna Schmidt = [Person A]",

  • a named character vector c("Anna Schmidt" = "[Person A]").

Usage

qda_pseudonyms(x, whole_word = TRUE, ignore_case = FALSE)

Arguments

x

The key list (see above).

whole_word

Logical; only replace whole words (default TRUE, so "Ina" does not hit "Martina").

ignore_case

Logical; also replace "ANNA" and "anna" (default FALSE).

Details

Longer names are replaced first, so "Anna Schmidt" wins over "Anna".

Value

A named character vector (names = originals) with the matching options as attributes; pass it to qda_import(pseudonyms = ...).

See Also

qda_import(), qda_pseudonymise_preview()

Examples

key <- qda_pseudonyms(c("Anna Schmidt = [Person A]", "Hamburg = [City 1]", "Anna = [Person A]"))
key
f <- file.path(tempdir(), "key.csv")
writeLines(c("original,replacement", "Anna Schmidt,[Person A]"), f)
qda_pseudonyms(f)

Find passages by a combination of codes (AND / OR / NOT)

Description

Lists every passage (segment or document) that contains all codes in all, at least one code in any and none of the codes in none – for example "Workload and Leadership in the same speaker turn, but not Family", only among documents with role = "nurse". This answers questions such as "how do participants talk about A when B comes up too?" and compares subgroups.

Usage

qda_query(
  all = NULL,
  any = NULL,
  none = NULL,
  vars = NULL,
  unit = c("segment", "document"),
  subcodes = TRUE,
  source = NULL,
  min_overlap = 1L,
  case = NULL
)

Arguments

all, any, none

Codes (paths such as "Motivation / Meaning" or unique labels). At least one of all or any is needed.

vars

Optional filter on document variables: a named list, e.g. list(role = "nurse") or list(role = c("nurse", "doctor")).

unit

"segment" (codes in the same segment) or "document".

subcodes

Logical; a code also counts when one of its subcodes is coded (default TRUE).

source

Optional documents (ids or names) to search.

min_overlap

Minimum number of characters a coding must overlap a passage.

case

Optional cases (ids or names, see qda_case_add()): only passages that lie in one of these cases.

Value

A tibble, one row per hit: source_id, source, segment, start, end, codes (the queried codes present), text. Attribute "info": the query and how many passages / documents were searched.

See Also

qda_query_to_code(), qda_cooccurrence()

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team")
qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5)
qda_code(1, "Motivation", segment = 7); qda_code(2, "Team", segment = 5)
qda_source_set_var(1, "role", "project lead")
qda_query(all = c("Career path", "Motivation"))        # both in the same segment
qda_query(any = c("Motivation", "Team"), none = "Career path")
qda_query(any = "Motivation", vars = list(role = "project lead"))
qda_case_add("Person A"); qda_case_assign("Person A", 1, segment = 5:7)
qda_query(any = "Motivation", case = "Person A")      # only this person's passages
qda_close()

Code the hits of a query with a code

Description

Turns the result of qda_query() into codings: every hit (segment or document) is coded with code. A code that does not exist yet is created first (as a top-level code, or below parent). The codings form one action: Ctrl+Z / qda_undo() removes them again (and a second undo the new code). Hits that already carry this code over the same range are skipped.

Usage

qda_query_to_code(hits, code, parent = NULL)

Arguments

hits

Result of qda_query().

code

Code (path or unique label) or the label of a new code.

parent

For a new code: its parent code (optional).

Value

Invisibly, a tibble of the new codings.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path"); qda_code_add("Motivation")
qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5)
hits <- qda_query(all = c("Career path", "Motivation"))
qda_query_to_code(hits, "Career and motivation")
qda_codings()[, c("code", "start", "end")]
qda_close()

Redo the last undone action

Description

Re-applies the action that the last qda_undo() reverted. Like in every editor, the redo list is cleared as soon as a new action is done.

Usage

qda_redo()

Value

Invisibly, a one-row tibble redone (action) and detail.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_undo()  # oops
qda_redo()  # back again
qda_close()

Define a passage as its own segment

Description

Makes start..end one segment (e.g. a passage marked in the app). Segments it overlaps are shortened; a segment that contains it entirely is split into up to three parts. Whitespace at the edges is trimmed.

Usage

qda_segment_define(source, start, end)

Arguments

source

Source id or unique name.

start, end

1-based inclusive character offsets.

Value

Invisibly, the new segments.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_segment_define(1, start = 120, end = 200)
qda_source_segments(1)
qda_close()

Merge a segment with the following one

Description

Merge a segment with the following one

Usage

qda_segment_merge(source, segment)

Arguments

source

Source id or unique name.

segment

Segment number; it is merged with segment segment + 1.

Value

Invisibly, the new segments.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_segment_merge(1, 1)   # segments 1 + 2 -> 1
qda_source_segments(1)
qda_close()

Split a segment at a character position

Description

The segment containing at is split so that a new segment starts at at (whitespace at the cut is trimmed away). Undoable.

Usage

qda_segment_split(source, at)

Arguments

source

Source id or unique name.

at

1-based character position where the new segment starts.

Value

Invisibly, the new segments.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_segment_split(1, at = 100)
qda_source_segments(1)
qda_close()

Retrieve all segments coded with a given code

Description

The "Retrieved Segments" view: every passage that received this code, with source, offsets, extracted text and memo.

Usage

qda_segments(code)

Arguments

code

Code id or unique label.

Value

A tibble: id, source_id, source, code_id, code, start, end, text, memo.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_code(1, "SME", segment = 3)
qda_segments("SME")
qda_close()

Back to automatic segments (blank lines)

Description

Deletes the stored segments of a document; afterwards the automatic paragraph segmentation of earlier jellyqda versions applies again. Undoable with qda_undo().

Usage

qda_segments_reset(source)

Arguments

source

Source id or unique name.

Value

Invisibly, the segments now in effect.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_segments_set(1, "line")
qda_segments_reset(1)   # back to blank-line segments
qda_source_segments(1)
qda_close()

Segment a document by a rule

Description

Replaces the segments of a document. Codings are not affected (they are stored by character offsets), only the segment numbers change. Undoable with qda_undo().

Usage

qda_segments_set(
  source,
  rule = c("blankline", "speaker", "line"),
  pattern = NULL
)

Arguments

source

Source id or unique name.

rule

"blankline" (paragraphs separated by blank lines, the default of jellyqda), "speaker" (a new segment at every speaker turn, e.g. "[00:01:12] P: ..." or "Befragte: ..."; lines without speaker label belong to the previous turn; blank lines also separate) or "line" (every non-empty line).

pattern

For rule = "speaker": regular expression (Perl) that recognises the first line of a speaker turn. The default matches an optional time stamp followed by a one-word label (up to 25 characters) and a colon; if the document contains time-stamped turns, only those count (so header lines like "Projekt: ..." are not split off).

Value

Invisibly, the new segments (tibble segment, start, end).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_segments_set(1, "line")      # one segment per line
qda_segments_set(1, "speaker")   # speaker turns like "[00:01:12] P: ..."
qda_source_segments(1)
qda_close()

Delete a variable from a source

Description

Delete a variable from a source

Usage

qda_source_del_var(source, key)

Arguments

source

Source id or name.

key

Variable name to remove.

Value

Invisibly, the remaining named character vector.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_source_set_var(1, "age", "34")
qda_source_del_var(1, "age")
qda_source_vars(1)
qda_close()

Segments of a source and where they come from

Description

Segments of a source and where they come from

Usage

qda_source_segments(source)

Arguments

source

Source id or unique name.

Value

A tibble: segment (number as shown in the app, "Seg N"), start, end (1-based character offsets), text. Attribute "origin": "automatisch" (blank lines, nothing stored) or "gespeichert".

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_source_segments(1)
qda_close()

Set a variable (case attribute) on a source

Description

Set a variable (case attribute) on a source

Usage

qda_source_set_var(source, key, value)

Arguments

source

Source id or name.

key

Variable name (e.g. "age").

value

Value (character).

Value

Invisibly, the named character vector of all variables.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_source_set_var(1, "age", "34")
qda_source_set_var(1, "role", "project lead")
qda_source_vars(1)
qda_close()

Get the variables (case attributes) of a source

Description

Get the variables (case attributes) of a source

Usage

qda_source_vars(source)

Arguments

source

Source id or name.

Value

Named character vector, e.g. c(age = "32", gender = "f").

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_source_set_var(1, "age", "34")
qda_source_vars(1)
qda_close()

List all imported sources

Description

List all imported sources

Usage

qda_sources()

Value

A tibble with one row per source: id, name, format, chars, segments (numbered paragraphs, see qda_view()), coded_chars and imported_at.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_sources()
qda_close()

Progress statistics of the active project

Description

Progress statistics of the active project

Usage

qda_stats()

Value

A named list of tibbles:

  • overall: one row – number of sources, codes, codings, memos, events, total characters, coded characters (union of coding intervals) and pct_coded

  • per_code: one row per code – n_codings, coded chars

  • per_source: one row per source – chars, coded_chars, pct_coded

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_stats()
qda_close()

Get one summary cell (or all summaries)

Description

Get one summary cell (or all summaries)

Usage

qda_summaries(code = NULL, source = NULL)

Arguments

code

Optional code id/label; with source returns that single cell.

source

Optional source id/name.

Value

A tibble: code_id, code, source_id, source, text_, updated_at.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_summary_set("SME", 1, "Strongly shaped by the first employer.")
qda_summaries()
qda_close()

Set the summary text for a code x source cell (Summary Grid)

Description

Creates or overwrites the summary of one cell. Empty text clears the cell.

Usage

qda_summary_set(code, source, text_)

Arguments

code

Code id or unique label.

source

Source id or unique name.

text_

Summary text.

Value

Invisibly, a one-row tibble with the stored summary.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_summary_set("SME", 1, "Strongly shaped by the first employer.")
qda_summaries()
qda_close()

Look at a survey file before importing it

Description

Reads a survey export (CSV or Excel) and suggests a role for every column: the respondent id, columns with open answers ("text"), columns to keep as document variables (few distinct values, e.g. age group or field of study) and columns to ignore (time stamps, IP addresses, ...). Pass the suggestions – or your own choice – to qda_import_survey().

Usage

qda_survey_columns(file, sheet = 1, name = NULL)

Arguments

file

Path to a .csv (comma, semicolon or tab separated) or .xlsx file (needs the package 'readxl').

sheet

Excel sheet (number or name).

name

File name to show (e.g. the original name of an upload).

Value

A tibble, one row per column: column, role, answers (non-empty cells), distinct, mean_chars, example. Attribute "rows": number of respondents.

Examples

f <- system.file("extdata", "survey_demo.csv", package = "jellyqda")
qda_survey_columns(f)

Undo the last action

Description

Reverts the most recent action. Every content change can be undone: codings (add, delete, memo), memos, codes (add, rename, move and delete – including all sub-codes, codings and summaries that were removed with it), document variables, summaries and segment changes. System actions (import, export, backup, auto_snapshot, project open/close) are not undoable. Repeated calls walk backwards through the history; qda_redo() re-applies undone actions. In the app: button "Undo" or Ctrl+Z, redo with Ctrl+Y.

Usage

qda_undo()

Details

Actions recorded by older jellyqda versions (without snapshot) are reverted with the previous per-action logic where possible.

Value

Invisibly, a one-row tibble: undone (action that was reverted) and detail (human-readable description).

See Also

qda_redo(), qda_history()

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Theme A")
qda_code(1, "Theme A", segment = 1)
qda_undo()  # removes the coding again
qda_undo()  # removes the code again
qda_redo()  # the code is back
qda_codes()$label
qda_close()

View a source in the RStudio Viewer with segment numbers and codings

Description

Renders the frozen text of a source as HTML: every paragraph is a numbered segment (the unit you address in qda_code()), and all codings are highlighted in the color of their code. In RStudio the HTML opens in the Viewer pane; elsewhere it is written to a temp file (opened in a browser when interactive).

Usage

qda_view(source, open = TRUE)

Arguments

source

Source id or unique name.

open

Logical; open the HTML in the RStudio Viewer / browser.

Value

Invisibly, the HTML string.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
html <- qda_view(1, open = FALSE)   # open = TRUE shows it in the Viewer
substr(html, 1, 80)
qda_close()

Word frequencies

Description

Counts the words of all documents, one document, or only of the passages coded with a code (incl. its subcodes) – an entry point for inductive work. Words are lower-cased; numbers, time stamps and stop words are left out.

Usage

qda_words(source = NULL, code = NULL, n = 50, min_chars = 3, stopwords = TRUE)

Arguments

source

Optional source id or name.

code

Optional code id or label: only words inside its codings (and those of its subcodes).

n

Number of words to return (most frequent first); Inf for all.

min_chars

Minimum word length.

stopwords

TRUE (built-in German and English lists), FALSE, or a character vector of further words to leave out (added to the built-in list).

Value

A tibble: word, n (occurrences), sources (in how many documents).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
qda_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_words(n = 10)
qda_words(code = "Career path")   # only within these codings
qda_close()