Re: [R] About Creating a List by Parsing Text

2008-08-05 Thread Jim Holtman
You need to read in the line with read.table to parse the string. The solution assumes a dataframe . Sent from my iPhone On Aug 5, 2008, at 7:16, "Henrique Dallazuanna" <[EMAIL PROTECTED]> wrote: I think that you need: p <- scan(textConnection(p), what = "") On Tue, Aug 5, 2008 at 7:41

Re: [R] About Creating a List by Parsing Text

2008-08-05 Thread Henrique Dallazuanna
I think that you need: p <- scan(textConnection(p), what = "") On Tue, Aug 5, 2008 at 7:41 AM, Gundala Viswanath <[EMAIL PROTECTED]> wrote: > Thanks Jim, > > But how can I modify this line of yours > > y <- lapply(split(x, x$V3), "[[", 8) > > to suit my 'comp.ll' > > I tried this but fail: >> p

Re: [R] About Creating a List by Parsing Text

2008-08-05 Thread Gundala Viswanath
Thanks Jim, But how can I modify this line of yours y <- lapply(split(x, x$V3), "[[", 8) to suit my 'comp.ll' I tried this but fail: > p <- "\tGene 11340 211952_at RANBP5 k= 1 LL= -970.692 " > y <- lapply(split(p, p[3]), "[[", 8) > y > list() - Gundala Viswanath Jakarta - Indonesia O

Re: [R] About Creating a List by Parsing Text

2008-08-05 Thread jim holtman
Does this get you close to what you want: > x <- read.table(textConnection("Gene 11340 211952_at RANBP5 k= 1 LL= > -970.692 + Gene 11340 211952_at RANBP5 k= 2 LL= -965.35 + Gene 11340 211952_at RANBP5 k= 3 LL= -963.669 + Gene 12682 213301_x_at TRIM24 k= 1 LL= -948.527 + Gene 12682 21

[R] About Creating a List by Parsing Text

2008-08-05 Thread Gundala Viswanath
Hi all, I have the following data in which I want to parse and store them in a list __DATA__ > print(comp.ll) [1] "\tGene 11340 211952_at RANBP5 k= 1 LL= -970.692 " [2] "\tGene 11340 211952_at RANBP5 k= 2 LL= -965.35 " [3] "\tGene 11340 211952_at RANBP5 k= 3 LL= -963.669 " [4