Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-29 Thread viritha k
ter','integer','integer','numeric','numeric')) > > as you have in your email. I used 'x' in my code, so I replaced your > 'm' with 'x'. > > Try it and see if it works; no reason it shouldn't. > >

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-28 Thread viritha k
ric','numeric'). So how do I incorporate that in your code. Thanks, Suji On Wed, Sep 28, 2011 at 2:40 PM, jim holtman wrote: > The solution that I sent will handle the 150 different samples; just > list the column names in the argument to the top 'lapply'. You don

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-28 Thread viritha k
Hi, This is the code that I wrote for 3 samples: code: >m<-read.table("test.txt",sep='\t',header=TRUE,colClasses=c('character','integer','integer','numeric','numeric','numeric')) > s<-data.frame(c(rle(m$Sample1)[[2]],rle(m$Sample2)[[2]],rle(m$Sample3)[[2]]),c(rle(m$Sample1)[[1]],rle(m$Sample2)[[1]]