May I ask for help with R coding? I would like to calculate the simple mean and standard deviation as shown below. This is an example of calculating it for species richness. However, I would like to calculate it for several species, each one is in a separate column (species1, species2, species3, species4 etc).
How can I do it automatically (I guess using some loop or funcion) in R and get a nice overview table where calculations for each species come one by one in below?
mean1=tapply(edge2$species_richness, list (Management =edge2$Management), mean) sd1=tapply(edge2$species_richness, list (Management =edge2$Management), sd)
cbind (mean1, sd1)
Result for species richness:
mean1 sd1
AES 15.6250 5.875089
AES2 29.5000 9.570789
Control 6.9375 8.590450
Centre 16.3125 5.437141
I ask help with R coding