I've been using the group_by and summarise functions for some time now to summarise my data per data group. I have a data frame with Site_Number, Seeding_depth and plant_Numbers. I used this code:
Marina_Survival2=group_by(Marina_Survival,Site_Number, Seeding_depth) %>%
summarise(mean=mean(plant_Numbers),sd=sd(plants_Numbers))
The output that I got was a data frame with 4 columns, Site_Number, Seeding_depth, mean and sd, With a mean and standard deviation for each of the combinations.
However, for some reason when I run the exact same code today I get a data frame with only 2 columns, mean and sd and only one value for each. I've tried reloading the tidyverse and dplyr packages but this hasn't worked.
Additionally, the select function also no longer works. It gives the error that I have unused arguments in my select command, even though it had no problem with it yesterday.
Does anyone know what is going wrong here and how I could fix it? As it would be very frustrating to rewrite my entire code so it no longer uses the package.
Marina_Survival2=byMarina_Survival2 %>%- Bappa Dasselectthing you can specify the library as welldplyr::select. - AlexBrasterloaded, which also has aselectfunction. - Amadou Kone