Re: [R] check availability of a file in R

2011-09-07 Thread Samuel Le
help-boun...@r-project.org] On Behalf Of Farhad Shokoohi Sent: 07 September 2011 01:07 To: R-help@r-project.org Subject: [R] check availability of a file in R I need to use a loop and each time go to folder i and check availability of .RData file. If it exist load it and if not submit a command

Re: [R] check availability of a file in R

2011-09-06 Thread David Winsemius
On Sep 6, 2011, at 8:07 PM, Farhad Shokoohi wrote: I need to use a loop and each time go to folder i and check availability of .RData file. If it exist load it and if not submit a command in linux. Something like this for (i in 1:10){ setwd(~/i/) # Perhaps: if (target %in%

[R] check availability of a file in R

2011-09-06 Thread Farhad Shokoohi
I need to use a loop and each time go to folder i and check availability of .RData file. If it exist load it and if not submit a command in linux. Something like this for (i in 1:10){ setwd(~/i/) if .Rdata (?) load (.RData else } Any idea how to do