selection-condition-helpers | R Documentation |
These helpers are meant to be used on the left hand side of the trick specification, to filter which tricks the addin should display.
selection_is_empty(target = c("default", "lines", "script"))
selection_is_comment_line(target = c("default", "lines", "script"))
selection_is_comment_block(target = c("default", "lines", "script"))
selection_is_n_lines(n, target = c("default", "lines", "script"))
selection_is_single_line(target = c("default", "lines", "script"))
selection_is_parsable(
multi_ok = TRUE,
single_ok = TRUE,
symbol_ok = TRUE,
empty_ok = FALSE,
target = c("default", "lines", "script")
)
selection_is_evaluable(
simple_only = FALSE,
target = c("default", "lines", "script")
)
selection_is_litteral(type = NA)
selection_is_reserved_word()
selection_is_symbol(litteral_ok = FALSE, reserved_ok = FALSE)
selection_is_call(
symbol_ok = FALSE,
litteral_ok = FALSE,
reserved_ok = FALSE,
target = c("default", "lines", "script")
)
selection_matches(
pattern,
n_min = 1L,
n_max = Inf,
target = c("default", "lines", "script"),
...
)
selection_inherits(class)
selection_is_function()
selection_is_data_frame()
selection_is_syntactic_package_name()
selection_is_installed_package()
selection_is_cran_package()
selection_is_in_rmd_chunk()
selection_is_in_rmd_text()
target |
If |
n |
number of lines |
multi_ok |
Are multiple calls eligible ? |
single_ok |
Are single calls eligible ? |
symbol_ok |
Are symbols eligible ? |
empty_ok |
whether an empty section qualifies |
simple_only |
if |
type |
atomic type |
litteral_ok |
Are literal strings or numbers eligible ? |
reserved_ok |
Are reserved words eligible ? |
pattern |
regular expression |
n_min |
minimal number of occurences to validate match |
n_max |
maximal number of occurences to validate match |
... |
additional arguments passed to |
class |
class used to check inheritance |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.