Skip to content
Prev 43880 / 398528 Next

iterating over files in a directory with R

On Sun, 8 Feb 2004, femke wrote:

            
sapply(list.files("a directory"), some.R.calculation)

or

files<-list.files("a directory")
for(each.file in files){
	some.R.calculation
}


	-thomas