find_gran | R Documentation |
This helper function takes a string (vector) as an input and searches for the
highest or lowest granularity. Granularity is defined in terms of a hash/
space sequence (see sum_str
). The search is implemented using
a recursive approach.
find_gran(direction = "down", highest = 3, lowest = 1, lines)
direction |
either "up" or "down". Down means the algorithm starts with
the pattern containing a certain number of hashes (specified in
|
highest |
The highest level of granularity to search for. |
lowest |
The lowest level of granularity to search for. |
lines |
a character vector containing the lines to match against. |
strcode:::find_gran("down", highest = 3, lowest = 1, lines = c("## .", "# _"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.