import_coding_matrices {novelqualcodes}R Documentation

Read exported NVivo Coding Matrices from a folder

Description

Coding matrices are built inside NVivo's Matrix Coding Query tool, with codes as rows and one participant ("case") as column. These files should be exported as Excel spreadsheets (XLS or XLSX format), which is the default for NVivo. There must only be one participant per file.

Filenames must reflect the chronological order of interviews when they are sorted. You can do this by naming them in sequence like "Interview 07 PID 2345", or by including a YMD HM timestamp like "2023-06-17 1345". Sorting is number-aware and only uses the filename itself (i.e. file path is ignored during sorting).

Usage

import_coding_matrices(path, recursive = FALSE)

Arguments

path

(Character) Path to a folder that contains coding matrices exported from NVivo (Explore then Matrix Coding Query then Export Coding Matrix). All files with .XLS or .XLSX extensions will be imported.

recursive

(Logical) If TRUE, also imports files inside subfolders of path.

Value

A list of dataframes.

See Also

score_codes(), import_field_notes()

Examples

# A folder of example coding matrices included with the package
path_to_matrices <- system.file("insect_study/matrices/", package = "novelqualcodes")
print(path_to_matrices)

# A list of files in that folder
list.files(path_to_matrices)

# Import them all at once
my_matrices <- import_coding_matrices(path_to_matrices)

# Look inside the result; each entry of 'my_matrices' is an interview, listed
# in chronological order.
print(my_matrices)


[Package novelqualcodes version 0.13.1 Index]