RESEARCH

dplyr – Calculating average value by grouping by multiple variables using Group_by function in R studio

I figured it out! I was writing my code as: mean_valueA=df%>% group_by(df$site, df$species) summarize(mean_val=mean(df$ValueA) because I thought that was the same as writing mean_ValueA=df%>% group_by(site, species) summarize(mean_val=mean(valueA) but it’s not.…Read moredplyr – Calculating average value by grouping by multiple variables using Group_by function in R studio