Simple question on piping

Having successfully used piping on a dataframe previously on the same script I found that it wouldn't work when passing a numeric to the abs function.

test <- 39-399  %>%
    abs

My questions are: What is going on here? And what are the rules for piping with %>%?

Of course instantly after asking I would find the answer to my question in here:

Another note is that special attention is advised when using non-magrittr operators in a pipe-chain ( +, -, $, etc.), as operator precedence will impact how the chain is evaluated. In general it is advised to use the aliases provided by magrittr

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.