Error in eval(predvars, data, env) : object 'avg' not found


#1

i am trying to apply t test in R on imported data (.sav file) using following command
t.test(performance~gender)
but the error shows like:
Error in eval(predvars, data, env) : object 'avg' not found
what should i do.


#2

That error usually implies you don’t have an object (or column in a data frame) named ‘avg’, your line of code also didn’t mention avg.

It would help if you asked this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.