View source: R/is_lint_level.R
is_lint_level | R Documentation |
Helper for determining whether the current source_expression
contains
all expressions in the current file, or just a single expression.
is_lint_level(source_expression, level = c("expression", "file"))
source_expression |
A parsed expression object, i.e., an element
of the object returned by |
level |
Which level of expression is being tested? |
tmp <- withr::local_tempfile(lines = c("x <- 1", "y <- x + 1"))
source_exprs <- get_source_expressions(tmp)
is_lint_level(source_exprs$expressions[[1L]], level = "expression")
is_lint_level(source_exprs$expressions[[1L]], level = "file")
is_lint_level(source_exprs$expressions[[3L]], level = "expression")
is_lint_level(source_exprs$expressions[[3L]], level = "file")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.