Description Usage Arguments Value Examples
Programatically append template on objects to the body of a function
1 2 3 4 5 6 7 | append_rlang(obj, template = "(!!sym('%s'))")
## S3 method for class 'function_usage'
append_rlang(obj, template = "(!!sym('%s'))")
## S3 method for class 'package_usage'
append_rlang(obj, template = "(!!sym('%s'))")
|
obj |
function_usage or package_usage class |
template |
pattern to replace an object with, Default: "(!!sym('%s'))" |
function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
x <- function(){
data <- tidyr::unite(mtcars, col = vs_am, c(vs,am))
ggplot2::ggplot(data = data, ggplot2::aes(x=mpg^2,y=qsec,colour=vs_am)) +
ggplot2::geom_point()
}
obj <- tidycheckUsage::tidycheckUsage(x)
(x1 <- tidycheckUsage::append_rlang(obj))
tidycheckUsage::tidycheckUsage(x1)
x1()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.