Replaces %>% in the global environment with %>=% so that existing pipelines using %>% are automatically logged without any code change.

Call logrittr_deactivate() to restore the original %>% behaviour.

logrittr_activate()

Value

Invisibly returns the previous definition of %>% in the global environment (or NULL if none existed).

Examples

if (FALSE) { # \dontrun{
library(logrittr)
library(dplyr)

logrittr_activate()

iris %>%
  filter(Sepal.Length < 5) %>%
  group_by(Species) %>%
  summarise(n = n())

logrittr_deactivate()
} # }