which package has the function of %^%?

Hi there,
I'm a new in using R and try to learn how to use pipe "%^%" to organize codes and got error message as

moderate<-final %^% + group_by(ModeratePA) %^% + summarize( + count=n(), + ht=mean(Height, na.rm=TRUE), + wt=mean(Weight, na.rm=TRUE) + ) %^% + filter(count>0)

Error in final %^% group_by(ModeratePA) %^% summarize(count = n(), ht = mean(Height, : could not find function "%^%"

my question is - do I need to install some package that has pipe function before running this?

Thanks in advance!

You mean %>%? never seen %^%

1 Like

The piping function %>% is part of the magrittr package, but it is imported by the dplyr package, so most people probably just get it that way. So, to make the function available in your R session, you need to install dplyr and then load it with...


thank you very much. I got it now.

Thanks. it works now.

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