View source: R/count_occurrences.R
count_occurrences | R Documentation |
Count code occurrences
count_occurrences(x, codes = ".*", matchRegexAgainstPaths = TRUE)
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 |
A data.frame()
.
### 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 occurrences
rock::count_occurrences(
loadedExample
);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.