resultsOverview_allCodedFragments {rock}R Documentation

Show all coded fragments

Description

Show all coded fragments

Usage

resultsOverview_allCodedFragments(
  x,
  root = "codes",
  context = 0,
  heading = NULL,
  headingLevel = 2,
  add_html_tags = TRUE,
  cleanUtterances = FALSE,
  output = NULL,
  outputViewer = "viewer",
  template = "default",
  includeCSS = TRUE,
  includeBootstrap = rock::opts$get("includeBootstrap"),
  preventOverwriting = rock::opts$get(preventOverwriting),
  silent = rock::opts$get(silent)
)

Arguments

x

The parsed source(s) as provided by rock::parse_source or rock::parse_sources.

root

The root code

context

How many utterances before and after the target utterances to include in the fragments. If two values, the first is the number of utterances before, and the second, the number of utterances after the target utterances.

heading

Optionally, a title to include in the output. The title will be prefixed with headingLevel hashes (⁠#⁠), and the codes with headingLevel+1 hashes. If NULL (the default), a heading will be generated that includes the collected codes if those are five or less. If a character value is specified, that will be used. To omit a heading, set to anything that is not NULL or a character vector (e.g. FALSE). If no heading is used, the code prefix will be headingLevel hashes, instead of headingLevel+1 hashes.

headingLevel

The number of hashes to insert before the headings.

add_html_tags

Whether to add HTML tags to the result.

cleanUtterances

Whether to use the clean or the raw utterances when constructing the fragments (the raw versions contain all codes). Note that this should be set to FALSE to have add_html_tags be of the most use.

output

Here, a path and filename can be provided where the result will be written. If provided, the result will be returned invisibly.

outputViewer

If showing output, where to show the output: in the console (outputViewer='console') or in the viewer (outputViewer='viewer'), e.g. the RStudio viewer. You'll usually want the latter when outputting HTML, and otherwise the former. Set to FALSE to not output anything to the console or the viewer.

template

The template to load; either the name of one of the ROCK templates (currently, only 'default' is available), or the path and filename of a CSS file.

includeCSS

Whether to include the ROCK CSS in the returned HTML.

includeBootstrap

Whether to include the default bootstrap CSS.

preventOverwriting

Whether to prevent overwriting of output files.

silent

Whether to provide (FALSE) or suppress (TRUE) more detailed progress updates.

Value

Invisibly, the coded fragments in a character vector.

Examples

### 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(
    exampleFile
  );

### Show organised coded fragments in Markdown
cat(
  rock::resultsOverview_allCodedFragments(
    parsedExample
  )
);


[Package rock version 0.8.1 Index]