R/parse_source_by_coderId.R
, R/parse_sources_by_coderId.R
parsing_sources_by_coderId.Rd
Parsing sources separately for each coder
parse_source_by_coderId(
input,
ignoreOddDelimiters = FALSE,
postponeDeductiveTreeBuilding = TRUE,
rlWarn = rock::opts$get(rlWarn),
encoding = "UTF-8",
silent = TRUE
)
parse_sources_by_coderId(
input,
recursive = TRUE,
filenameRegex = ".*",
ignoreOddDelimiters = FALSE,
postponeDeductiveTreeBuilding = TRUE,
encoding = rock::opts$get(encoding),
silent = rock::opts$get(silent)
)
For parse_source_by_coderId
, either a character vector
containing the text of the relevant source or a path to a file that
contains the source text; for parse_sources_by_coderId
, a path to a
directory that contains the sources to parse.
If an odd number of YAML delimiters is encountered, whether this
should result in an error (FALSE
) or just be silently ignored (TRUE
).
Whether to imediately try to build the deductive
tree(s) based on the information in this file (FALSE
) or whether to skip that. Skipping
this is useful if the full tree information is distributed over multiple files (in which case
you should probably call parse_sources
instead of parse_source
).
Whether to let readLines()
warn, e.g. if files do not end
with a newline character.
The encoding of the file to read (in file
).
Whether to provide (FALSE
) or suppress (TRUE
) more detailed progress updates.
Whether to search all subdirectories (TRUE
) as well or not.
A regular expression to match against located files; only files matching this regular expression are processed.
For rock::parse_source_by_coderId()
, an object of
class rock_parsedSource
; for rock::parse_sources_by_coderId()
, an
object of class rock_parsedSources
. These objects contain the original
source(s) as well as the final data frame with utterances and codes, as
well as the code structures.
### Get path to example source
examplePath <-
system.file("extdata", package="rock");
### Get a path to one example file
exampleFile <-
file.path(examplePath, "example-1.rock");
### Parse single example source
parsedExample <- rock::parse_source_by_coderId(exampleFile);