Hi,
I do not understand why the dplyr package is having an error with one of my sites. Could one of you awesome people please help me with this? Thank you so much for reading this
ERROR CODE
<error/dplyr_error>
Problem with summarise()
input Sum
.
x object 'Abundance' not found
i Input Sum
is sum(Abundance)
.
i The error occurred in group 1: Plot = "C15B".
DPUT
structure(list(Plot = c("D15B", "D15B", "D15B", "D610B", "D610B",
"D610B", "D15F", "D15F", "D15F", "D610F", "D610F", "D610F", "HR15B",
"HR15B", "HR15B", "HR610B", "HR610B", "HR610B", "HR15F", "HR15F",
"HR15F", "HR610F", "HR610F", "HR610F", "C15B", "C15B", "C15B",
"C610B", "C610B", "C610B", "C15F", "C15F", "C15F", "C610F", "C610F",
"C610F"), tax_group = c("p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria", "p__Proteobacteria", "p__Actinobacteria",
"p__Acidobacteria"), abundance = c(44.807, 26.819, 8.48, 40.907,
34.651, 6.6, 36.558, 40.904, 5.934, 36.811, 38.847, 6.609, 39.401,
39.446, 5.89, 40.114, 37.523, 7.567, 45.911, 29.881, 5.795, 43.133,
29.251, 6.666, 30.137, 31.783, 10.616, 27.734, 23.641, 10.709,
26.722, 34.918, 8.988, 31.261, 31.308, 11.794)), row.names = c(NA,
-36L), class = c("tbl_df", "tbl", "data.frame"))
CODES
sum_subset_of_phylum.dat_long <- subset_of_phylum.dat_long %>%
group_by(Plot) %>%
summarize(Sum = sum(Abundance),
SD = sd(Abundance))