我是编码和R的新手,我正在尝试在我的项目数据集上运行anova。我正在寻找条件对响应时间的影响(resp.rt)。我不断收到以下错误:
Error in eval(expr, envir, enclos) : object 'resp.rt' not found
这是我的代码:
setwd('C:/Users/Dasha/Documents/R/stroop')
files <- list.files(path = ".", pattern = "_stroop.csv")
data_frame <- do.call(rbind,lapply(files,read.csv, header = T))
print(i)
#Change independent variables to factors
data_frame$congruent <- as.factor(data_frame$congruent)
data_frame$session <- as.factor(data_frame$session)
data_frame$participant <- as.factor(data_frame$participant)
model_rt <- lm (resp.rt ~ participant + session + congruent + condition + condition*session, data_frame = data_frame)
anova(model_rt)
任何帮助将不胜感激!
答案 0 :(得分:0)
您的data_frame变量(描述性)很可能没有&#34; resp.rt&#34;场...