I think, you are right. Let's take a look at AST:
library(lobstr)
ast(y %<>% log10() %>% exp())
#> █─`%>%`
#> ├─█─`%<>%`
#> │ ├─y
#> │ └─█─log10
#> └─█─exp
Created on 2019-06-28 by the reprex package (v0.3.0)
The way I understand this, when %<>%
is called, magrittr
namespace is found because %>%
is present.
Without %>%
AST looks like this:
library(lobstr)
ast(v1 %<>% log10)
#> █─`%<>%`
#> ├─v1
#> └─log10
Created on 2019-06-28 by the reprex package (v0.3.0)
And namespace is not loaded most likely.
Just in case, using two non-exported functions from magrittr
fails as well, so I would put my money on the fact that pipe is re-exported:
library(lobstr)
ast(v1 %<>% log10 %T>% print)
#> █─`%T>%`
#> ├─█─`%<>%`
#> │ ├─v1
#> │ └─log10
#> └─print
v1 %<>% log10 %T>% print
#> Error in v1 %<>% log10 %T>% print: could not find function "%T>%"
Created on 2019-06-28 by the reprex package (v0.3.0)
EDIT: Actually, this example is more illuminating, I think:
library(tidyverse)
v1 %>% log10 %T>% print
#> Error in v1 %>% log10 %T>% print: could not find function "%T>%"
library(lobstr)
ast(v1 %>% log10 %T>% print)
#> █─`%T>%`
#> ├─█─`%>%`
#> │ ├─v1
#> │ └─log10
#> └─print
Created on 2019-06-28 by the reprex package (v0.3.0)
This version fails because when %T>%
is called there is no magrittr
namespace to look at.