Last answered:

10 Apr 2020

Posted on:

09 Apr 2020

0

R programming

when i run this code at the beginning it does not give this error but when i save and open my script after sometime it say function not found   code- star.species <- group_by(star, species)
star.srm <- summarise(star.species, count = n(), avg.mass = mean(mass, na.rm = T))
filter(star.srm, count >1)
my.data   error- Error in group_by(star, species) : could not find function "group_by"
1 answers ( 0 marked as helpful)
Instructor
Posted on:

10 Apr 2020

0
Hi Viraj,  the function group_by is part of the 'dplyr' package.  So, you need to include the library in your script to avoid this error. Just add the following line at the beginning of your script: library("tidyverse")   Best,  Eli

Submit an answer