Question regarding t.test
Hello, I tried to repeat what was done in the video using the following code:
library(tidyverse)
data <- read.csv('independent-samples.csv')
data <- gather(data, Engineering, Management, key = 'Course', value = 'Grades')
t.test(data~Course, data = data, mu = -4)
Then after the last line of code using t.test, it came out to an error message:
Error in model.frame.default(formula = data ~ Course, data = data) :
invalid type (list) for variable 'data'
Could you please help me look at this code? Thank you very much.
0 answers ( 0 marked as helpful)