I found out that some expressions can be transmitted only if inside curly brackets (curly braces, { }
), for example:
library(dplyr)
3 %>% {3 + .}
3 %>% {ifelse(. < 2, TRUE, FALSE)}
What are the rules for using curly braces in pipelines? When should we use it and with what expressions?
source
share