R里面closure is not subsettable该怎么解决

R里面这个报错到底是因为什么(需要载入哪个包或者是一些别的问题,大小写格式和代码没有问题之前跑出来过)

mydata<-read.csv("a2.csv")
a<-c("I849")
newdata<-data[which(data[,1]%in% a),]
Error in data[, 1] : object of type 'closure' is not subsettable
就是在一列数据里面筛选出含有I849的人