Created
June 15, 2014 11:48
-
-
Save ashim888/e9fbce13aec1770dc617 to your computer and use it in GitHub Desktop.
Random File Name Loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what<-function(id=1:333){ | |
fileLocation<-paste(getwd(),"/",sep="") | |
for(i in id){ | |
if(i<10){ | |
fileName<-paste("00",id,".csv",sep="") | |
return(fileName) | |
} | |
else{ | |
fileName<-paste("0",id,".csv",sep="") | |
return(fileName) | |
} | |
#readFile<-read.csv(paste(fileLocation,"specdata/",filename,sep="")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
change id to i
change return to print