import_transcripts: Extract interview transcripts for RQDA

View source: R/import.R

import_transcriptsR Documentation

Extract interview transcripts for RQDA

Description

A script to extract the zip archive containing interview transcripts

Usage

import_transcripts(
  rqdaDirpath,
  zipfile = NULL,
  patterns = NULL,
  ignore_case = FALSE,
  no. = NULL
)

lga_matching_function(state, ...)

Arguments

rqdaDirpath

The path to a base RQDA project that is used to create projects to which the transcript data are imported into.

zipfile

Path to a ZIP archive containing interview transcripts. When NULL, a file selection dialog is presented to the user - this only works in interactive sessions.

patterns

A regular expression or matching string for selecting LGAs.

ignore_case

Logical; whether to consider the case when matching.

no.

The number of projects to be created as a numeric vector of length 1.

state

The project State for which the matches/patterns are to be extracted.

...

Optional list of States to be manually provided for pattern selection.

Details

First we pick the archive interactively and unzip it into the same directory containing the archive. After establishing the directory for the extraction, we modify the names of the files by removing all spaces therein. Then we move them into the State-specific folder. When finalising, we do some checks that everything went well and we remove the directory that was created for the extraction.

Value

For lga_match_function, a function that takes a list of patterns for different states. No value is returned by import_transcriipts

A function, which recieves a list of patterns for LGAS and when called, returns the ones relevant to state.

Note

For lga_matching_function, a list of project States is set internally by getOption("jgbv.project.states"). This option is set for the GBV assessment projects beginning 2021, and does not apply to earlier ones.

To get the appropriate patterns or matches to be used for the extracting function, there is need to inspect the list of transcript files. There, it will be discovered how they are named and differentiated by LGA.


BroVic/raampGBV documentation built on Oct. 7, 2022, 11:06 p.m.