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"
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)
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