This is the code
`
region<-"ARLINGTON"
data<-read.csv("city_markets.csv")
for(i in 1:length(data[[1]])){
if(grep(region,as.character(data[[3]][i]),ignore.case=TRUE)==1){
for(j in 1:length(data)){ write(data[[j]][i],"analyzed.txt",append=TRUE) } }
} `
now what i'm trying to do here is I'm accessing the csv's column(3rd one) and comparing it with the region specified! i keep getting the error
Error in if (grep(region, as.character(data[[3]][i]), ignore.case = TRUE) == :
argument is of length zero