I have a more problem: Because there are few files which can't be read into R 
completely, so on the following subsequence programme, I use write.table, which 
creates the "NA" files for those incomplete files autimatically. 
I don't want those NA files. How can I do the following:
whenever readLines can't completely read one file, then autimatically remove it 
from my dataset?

Thanks.
Tammy





> From: www...@gmail.com
> Date: Thu, 1 Oct 2009 11:06:35 -0300
> Subject: Re: [R] The problem of readLines
> To: metal_lical...@live.com
> CC: r-help@r-project.org
> 
> From the help page for readLines:
> 
> " If the final line is incomplete (no final EOL marker) the
>      behaviour depends on whether the connection is blocking or not.
>      For a non-blocking text-mode connection the incomplete line is
>      pushed back, silently.  For all other connections the line will be
>      accepted, with a warning. "
> 
> You can disable the warning with;
> 
> readLines('your_file', warn = FALSE)
> 
> On Thu, Oct 1, 2009 at 9:39 AM, Tammy Ma <metal_lical...@live.com> wrote:
> >
> > Dear R-users,
> >
> >
> > I use "readLines" to read data, but when processing the large data set, 
> > there are few files which can not be readed in:
> >
> > 48: In readLines(name_c[i]) ... :
> >  incomplete final line found on 'C:/Documents and Settings/lma/My 
> > Documents/habitdata/244052900243997/calllog/calllog_log-20050505T121611.txt'
> > ...
> >
> >
> >
> > Whats the problem about this?
> >
> > Regards,
> > Tammy
> >
> >
> >
> > _________________________________________________________________
> > More than messages–check out the rest of the Windows Live™.
> > http://www.microsoft.com/windows/windowslive/
> >        [[alternative HTML version deleted]]
> >
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> >
> 
> 
> 
> -- 
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
                                          
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to