Interesting tidy eval use cases

Unfortunately that doesn't actually need tidy eval, as the usual semantics of ... are enough:

filter_loudly <- function(x, ...){
  in_rows <- nrow(x)
  out <- filter(x, ...)
  out_rows <- nrow(out)
  message("Filtered out ", in_rows - out_rows, " rows.")
  out
}

(this works reliably because of tidy eval, but you don't need to explicitly use it)

1 Like