Problem with loop
Hi, I try to build a loop difficultly. I have in a folder called Matrices several files (.csv) called Mat2002273, Mat2002274 to Mat2002361. I want to calculate for each file the mean of the column called Pixelvalues. I try this code but as result, I have this message: Mat2002273 not found
essai<-read.table("C:\\Users\\Desktop\\Matrices\\Mat2002273.csv",sep=";",dec=",",header=TRUE)
essai
a <- NULL
for(i in Mat2002273:Mat2002361){
paste(mean(essai$Pixelvalues))
a[i] <- paste(mean(essai$Pixelvalues))
print(a[i])
}
Thank you for your help -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-loop-tp4148083p4148083.html Sent from the R help mailing list archive at Nabble.com.