[R] Multiple comment.char under read.table

From: Gundala Viswanath <gundalav_at_gmail.com>
Date: Fri, 06 Jun 2008 16:47:23 +0900

Hi all,

Suppose I want to read a text file with read.table. It containt lines to be skipped that begins with "!" and "^".

Is there a way to include this two values in the read.table function? I tried this but doesn't seem to work.

dat <- read.table("mydata.txt", comment.char = c("!","^") , na.strings = "null", sep = "\t");

Please advice.

Gundala Viswanath

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 06 Jun 2008 - 10:23:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 Jun 2008 - 15:30:38 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive