The "problem" is that magrittr has a short notation for anonymous functions:
. %>% is.data.frame
roughly coincides with
function(.) is.data.frame(.)
In other words, when the point is the left (leftmost) side, the pipe has a special behavior.
You can avoid behavior in several ways, for example.
(.) %>% is.data.frame
or in any other way when the LHS is not identical . In this particular example, this may seem like an undesirable behavior, but usually in such examples there really is no need to bind the first expression, therefore is.data.frame(.) Is as expressive as . %>% is.data.frame . %>% is.data.frame , and examples like
data %>% some_action %>% lapply(. %>% some_other_action %>% final_action)
can be considered more understandable than
data %>% some_action %>% lapply(function(.) final_action(some_other_action(.)))
source share