Funcion %>% no encontrada

necesito corres este simple codigo y sale el siguiente error, alguien sabe como solucionarlo?

d_hat <- polls %>% summarize(avg = sum(estimate*sample_size) / sum(sample_size)) %>% .$avg
Error in polls %>% summarize(avg = sum(estimate * sample_size)/sum(sample_size)) %>% :
no se pudo encontrar la función "%>%"

Try adding library(dplyr) at the beginning of your code.

Thanks siddharthprabhu!!!!!
I spent the hole weekend on that. i even reintaled R, I knew that was some sort of problem with dplyr but I assumed in was read by default and it was not working!
Thanks again!!!

1 Like

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