[R] Reading comments in text file from R

David Winsemius dwinsemius at comcast.net
Wed Dec 2 19:29:39 CET 2009


On Dec 2, 2009, at 1:26 PM, Graham Smith wrote:

> When a text file starts with a few lines commented out with # can you
> read those line from within R.

?readLines

>
> read.table ignores the comments to load the file, but it would
> sometimes  be useful to be able to read what these comments say.
>
> Thanks,
>
> Graham
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list