dir_map: Map Transcript Files from a Directory to a Script

Description Usage Arguments Details Value Note See Also Examples

Description

Generate script text (and optionally output it to the clipboard and/or an external file) that can be used to individually read in every file in a directory and assign it to an object.

Usage

1
2
3
  dir_map(loc, obj.prefix = "dat",
    col.names = c("person", "dialogue"), file = NULL,
    copy2clip = TRUE)

Arguments

loc

The path/location of the transcript data files.

obj.prefix

A character string that will be used as the prefix (followed by a unique digit) as the assignment object.

col.names

Supplies a vector of column names to the transcript columns.

file

A connection, or a character string naming the file to print to.

copy2clip

logical. If TRUE attempts to copy the output to the clipboard.

Details

Generally, the researcher will want to read in and parse every transcript document separately. The task of writing the script for multiple transcript documents can be tedious. This function is designed to make the process more efficient and less prone to errors.

Value

Prints a read in script text to the console, optionally copies the wrapped text to the clipboard on a Mac or Windows machine and optionally prints to an outside file.

Note

skip is set to 0, however, it is likely that this value will need to be changed for each transcript.

See Also

read.transcript

Examples

1
2
3
(DIR <- gsub("trans1.docx", "", system.file("extdata/trans1.docx",
    package = "qdap")))
dir_map(DIR)

trinker/qdap2 documentation built on May 31, 2019, 9:47 p.m.