This is a convenience function to use when displaying a source. It returns an object with the raw and clean utterances in a source, as well as the utterance identifiers and a list with vectors of the codes for each utterance.

get_utterances_and_codes_from_source(x, ...)



Either the result of a call to parse_source(), or a path or text to pass to parse_source().


Arguments to parse_source(), which is called to parse the source.


A list containing $utterances_raw, $utterances_clean, $uids$, $codeMatches, and $codesPerUtterance.


### 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
res <-
#> Warning: For graphs, attribute fontcolor had multiple values specified: 'Firebrick' & 'Black'; taking the first one.
#> Warning: For nodes of types matching regular expression 'grandchildCode2', duplicate attributes were found