if (FALSE) {
box::use(
dplyr[`%>%`, filter, pull],
stringr,
)
mpg <- mtcars %>%
filter(mpg <= 10) %>%
pull(mpg)
mpg <- mtcars %>%
filter(mpg <= 10) %>%
select(mpg) # will lint
trimmed_string <- stringr$str_trim(" some string ")
trimmed_string <- stringr$strtrim(" some string ") # will lint
existing_function <- function(x, y, z) {
mean(c(x, y, z))
}
existing_function(1, 2, 3)
non_existing_function(1, 2, 3) # will lint
average(1, 2, 3) # will lint
}
Run the code above in your browser using DataLab