[R] .gct file
Marc Schwartz (via MN)
mschwartz at mn.rr.com
Tue Jul 19 19:30:15 CEST 2005
On Tue, 2005-07-19 at 13:16 -0400, mark salsburg wrote:
> ok so the gct file looks like this:
>
> #1.2 (version number)
> 7283 19 (matrix size)
> Name Description Values
> .... ....... ......
>
> How can I tell R to disregard the first two lines and start reading
> the 3rd line in this gct file. I would just delete them, but I do not
> know how to open a gct. file
>
> thank you
>
> On 7/19/05, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> > On 7/19/2005 12:10 PM, mark salsburg wrote:
> > > I have two files to compare, one is a regular txt file that I can read
> > > in no prob.
> > >
> > > The other is a .gct file (How do I read in this one?)
> > >
> > > I tried a simple
> > >
> > > read.table("data.gct", header = T)
> > >
> > > How do you suggest reading in this file??
> > >
> >
> > .gct is not a standard filename extension. You need to know what is in
> > that file. Where did you get it? What program created it?
> >
> > Chances are the easiest thing to do is to get the program that created
> > it to export in a well known format, e.g. .csv.
> >
> > Duncan Murdoch
The above would be consistent with the info in my reply.
I guess if the format is consistent, as per Mark's example above, you
can use:
read.table("data.gct", skip = 2, header = TRUE)
which will start by skipping the first two lines and then reading in the
header row and then the data.
See ?read.table
HTH,
Marc Schwartz
More information about the R-help
mailing list