[R] how disable the Error massage in read.table() " no lines available in input"

Rui Barradas ruipbarradas at sapo.pt
Thu May 17 13:28:23 CEST 2012


Hello,

Apparently this is a follow-up from  an earlier post.
I had answered but a misplaced comma in the subject line started another 
thread, that you haven't read.
My original answer is in

http://r.789695.n4.nabble.com/Re-Problem-to-resolve-a-step-for-reading-a-large-TXT-and-split-in-several-file-td4630242.html

As for your question, see the error trapping functions help pages.

?try
?tryCatch

And, in readLines the correct option would be ok = TRUE, warn = TRUE is 
about an end of text marker.

?readLines

Hope this helps,

Rui Barradas

Em 17-05-2012 11:00, gianni lavaredo escreveu:
> Date: Wed, 16 May 2012 19:06:14 +0200
> From: gianni lavaredo<gianni.lavaredo at gmail.com>
> To:r-help at r-project.org
> Subject: [R] how disable the Error massage in read.table() " no lines
> 	available in input"
> Message-ID:
> 	<CAJ6JbR-H6p9A+hZk-exGYDcPdC__SLBLrM_oRw-=j+DU3YGXJw at mail.gmail.com>
> Content-Type: text/plain
>
> Dear Researchers,
>
> I am looking a way to disable the Error massage in read.table() as warn =
> TRUE in readLines(), when the lines are empty
>
> Error in read.table(con, header = F, sep = " ", nrow = n) :
>    no lines available in input
>
> thanks for all suggestions
> Gianni
>
> 	[[alternative HTML version deleted]]
>



More information about the R-help mailing list