Re: [Rd] resampling from string when it runs across multiple lines

2008-03-24 Thread Dimitris Rizopoulos
try this: y <- as.matrix(read.table(textConnection( "A C G T T G C A G C A C G F F F F F F G A C G S S S S S G A A C G T T G C A G G A B B

[Rd] resampling from string when it runs across multiple lines

2008-03-24 Thread Suraaga Kulkarni
Hi, I need to resample from a long string, which is written in many lines with carriage-return marks at the end of each line. Perhaps because the data looks like a matrix, using the code: sample(data, 25, replace=T) gives me 25 columns of characters from the data because it is resampling whole co