Re: [Rd] resampling from string when it runs across multiple lines
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
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