Re: [R] read.delim2 regarding "#"

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Wed 01 Jun 2005 - 02:13:17 EST

Hai Lin wrote:
> Hello R experts:
>
> When I tried to read my data into R, it does not take
> # sign
>
> A subset of Exp.txt is:
> Experiment name assay id Varname
> (A1)DBA TPA 6h/DBA Acetone rep1(A1) #3 4090 A90C1
> (A2)DBA TPA 6h/DBA Acetone rep2(A2) #3 4091 A91C1
> The command is:
> Exp <- read.delim2("Exp.txt",check.names=F,as.is=T)
>
> It is excuted but gave me all the NAs. Can you all
> drop me a hint?
>
> Thanks in advance.
>
> Kevin

Please (re)read ?read.delim2. It is just a wrapper for read.table. The latter has an argument for comment.char. Maybe try:

Exp <- read.delim2("Exp.txt", check.names = FALSE,

                     as.is = TRUE, comment.char = "")

--sundar



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 01 02:51:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:17 EST