cancers=c('breast','digothr','malegen','femgen','other','respir','colrect','lymyleuk','urinary') for (pre in c('yr1992_2002.sj_la_rg_ak/','yr1973_2002.seer9/')) for (k in 1:9) { iname=paste("c:/SEER02/",pre,cancers[k],'.stx',sep="") oname=paste("c:/SEER02/",pre,cancers[k],'.RData',sep="") DF=read.table(file=iname,sep="\t",header=T) save(DF,file=oname) }