snoe_plot | R Documentation |
Soft Non-numeric Occurrence Estimation (SNOE) plot
snoe_plot(
x,
codes = ".*",
matchRegexAgainstPaths = TRUE,
estimateWithin = NULL,
title = "SNOE plot",
ggplot2Theme = ggplot2::theme_minimal(),
greyScale = FALSE,
colors = c("#0072B2", "#C0C0C0"),
greyScaleColors = c("#808080", "#C0C0C0"),
silent = rock::opts$get("silent")
)
x |
A parsed source(s) object. |
codes |
A regular expression to select codes to include, or, alternatively, a character vector with literal code idenfitiers. |
matchRegexAgainstPaths |
Whether to match the |
estimateWithin |
The column specifying within what to count. |
title |
Title of the plot |
ggplot2Theme |
Can be used to specify theme elements for the plot. |
greyScale |
Whether to produce the plot in color ( |
colors , greyScaleColors |
The (two) colors to use for the color and greyscale versions of the SNOE plot. |
silent |
Whether to be chatty or silent |
a ggplot2::ggplot()
.
### Get path to example source
examplePath <-
system.file("extdata", package="rock");
### Get a path to one example file
exampleFile <-
file.path(examplePath, "example-3.rock");
### Load example source
loadedExample <- rock::parse_source(exampleFile);
### Show code occurrence estimates
rock::snoe_plot(
loadedExample
);
### Load two example sources
loadedExamples <- rock::parse_sources(
examplePath,
regex = "example-[34].rock"
);
rock::snoe_plot(
loadedExamples
);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.