ay, November 09, 2010 8:56 AM
>> To: r-help
>> Subject: [R] How to program an error into an if-then statement
>>
>> Hello!
>>
>> I am running a loop (for a range of dates) and in this loop I am
>> reading in different files - based on a date that is part of
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Dimitri Liakhovitski
> Sent: Tuesday, November 09, 2010 8:56 AM
> To: r-help
> Subject: [R] How to program an error into an if-then statement
>
> Hello!
Take a look in ?try and ?tryCatch
myfile <- tryCatch(read.csv(myfilename), error = invisible)
myfile$message
On Tue, Nov 9, 2010 at 2:55 PM, Dimitri Liakhovitski <
dimitri.liakhovit...@gmail.com> wrote:
> Hello!
>
> I am running a loop (for a range of dates) and in this loop I am
> reading in d
Hello!
I am running a loop (for a range of dates) and in this loop I am
reading in different files - based on a date that is part of the file
name.
However, for some of the dates, I have no file (no way to know which
dates). So, when I try to read it in I get an error:
Error in file(file, "rt") :
4 matches
Mail list logo