Error in eval(predvars, data, env) : object 'oysters.consumed' not found

I'm new to R. I'm trying to run an analysis of variance (aov) on my "" frame. My original data was titled "data" then i reorganized it into "". I can see when I view the data table that "" contains the column "oysters.consumed" but I keep getting an error telling me that it can't be found. Can anyone tell me why? it works when i use the the original data frame "data", just not when i try to use "". <- data %>%
group_by(sound.treatment, tank) %>%
summarise(osyters.consumed = sum(oysters.consumed))

aov <- aov(oysters.consumed~sound.treatment, data =

my aov code isn't working. I keep getting the error:
Error in eval(predvars, data, env) : object 'oysters.consumed' not found

what method are you using to view the datatable ?
you can check the names programmatically by


As a side note I would caution against assigning your results to the same name as r functions it can cause confusion

aov <- aov(etc.)
my.aov <-aov(etc.)

is much better

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.