knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "tools/readme/README-"
)

tidycheckUsage

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.

Installation

remotes::install_github('yonicd/tidycheckUsage')

Examples

Installed Packages

library(tidycheckUsage)
install.packages(c('dplyr'))
library(dplyr,warn.conflicts = FALSE,quietly = TRUE)

knitr::kable(tidycheckUsagePackage('dplyr'))

Built Packages

system('git clone https://github.com/hrbrmstr/slackr.git')
devtools::install('slackr')
tidycheckUsagePackage('slackr')

Functions in Environment

myfun <- function(x){

  ret <- mtcars%>%
    mutate(mpg2=mpg*x)

  ret <- ret%>%
    dplyr::mutate(mpg3=mpg2^2)

}

tidycheckUsage(fun = myfun)


yonicd/tidycheckUsage documentation built on May 10, 2019, 8:31 a.m.