I am trying to create a count of as a first step to calculate a percent cover for each category. The code below has worked before, but is no longer working.
I have read other posts on SO and none of them seem to capture the problem I'm experiencing.
Here is a reproducible example of what I'm trying to do:
 library(dplyr)
cover_data_test<- data.frame( site=c('cram','khq','k50'), 
                     treatment=c('exc','out','exc'), 
                     season=c('fall','spring','fall'),
                     transect=c(1,1,1), 
                     point=c(1,2,3),
                     ground=c('b','l','pb')
                     )
 View(cover_data_test)
  groundcover_test<- cover_data_test%>%
        group_by(season,site,treatment,transect)%>%
        count(ground)
I am still getting this error with the above example:
"Error in FUN(X[[i]], ...) : object 'b' not found"
Any ideas about what might be going on?
 
    