% drop_na() t.test(RT ~ Stimulus, data.l, paired = TRUE) Gives me an error: Erro" /> % drop_na() t.test(RT ~ Stimulus, data.l, paired = TRUE) Gives me an error: Erro" /> % drop_na() t.test(RT ~ Stimulus, data.l, paired = TRUE) Gives me an error: Erro"/>

T.Test Multiple Errors

43 Views Asked by At
# PREP
data.l <- read.csv("DataLong.csv")

# Statistical Test

data.l %>%
  drop_na()
t.test(RT ~ Stimulus, data.l, paired = TRUE)

Gives me an error:

Error in t.test.formula(RT ~ Stimulus, data.l, paired = TRUE) : 
  grouping factor must have exactly 2 levels

I have numerical data in RT and categorical in Stimulus (either "auditory" or "visual"), each participant has an RT number value for both "auditory" and "visual". I am trying to do a paired t.test to see the difference between the auditory and visual.

I don't understand why its not working :(

The code used to look like:

t.test(auditory~visual, data.l, paired= TRUE)

and worked in the past but now has an error as well:

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

There are 0 best solutions below