Problem: Running into the following error when trying to run the R language code snippet below:
# Code: heights %>% mutate(height = round(height)) %>% group_by(height) %>% summarize(p = mean(sex == "Male")) %>% qplot(height, p, data=.) # Error: Error in heights %>% mutate(height = round(height)) %>% group_by(height) %>% : could not find function "%>%"
Solution: There are a number of potential solutions for this issue but what worked for me was to install the
margrittr package by running the following command in the R console:
Thanks for reading this blog post!
If you have any questions or concerns please feel free to post a comment in this post and I will get back to you if I find the time.