knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "tools/readme/README-" )
When using magrittr
pipes or ggplot2
reading the objects that you forgot
to enquo
is a pain. These functions can be run prior to
devtools::check
to return a data.frame
containing all the warnings
created when check
runs codetools::checkUsage
. Using this information actionable functions append rlang
syntax to fix the warnings.
remotes::install_github('yonicd/tidycheckUsage')
library(tidycheckUsage)
install.packages(c('dplyr'))
library(dplyr,warn.conflicts = FALSE,quietly = TRUE) knitr::kable(tidycheckUsagePackage('dplyr'))
system('git clone https://github.com/hrbrmstr/slackr.git') devtools::install('slackr')
tidycheckUsagePackage('slackr')
myfun <- function(x){ ret <- mtcars%>% mutate(mpg2=mpg*x) ret <- ret%>% dplyr::mutate(mpg3=mpg2^2) } tidycheckUsage(fun = myfun)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.