Re: [R] Loop avoidance and logical subscripts

2009-05-27 Thread retama
Thank you! The script is now adapted to Biostrings and it is really fast! For example, it does: alph_sequence <- alphabetFrequency(data$sequence, baseOnly=TRUE) data$GCsequence <- rowSums(alph_sequence[,c("G", "C")]) / rowSums(alph_sequence) in the G+C computation. It also works amazingly

Re: [R] Loop avoidance and logical subscripts

2009-05-21 Thread Ted Harding
On 21-May-09 16:56:23, retama wrote: > Patrick Burns kindly provided an article about this issue called > 'The R Inferno'. However, I will expand a little bit my question > because I think it is not clear and, if I coud improve the code > it will be more understandable to other users reading this m

Re: [R] Loop avoidance and logical subscripts

2009-05-21 Thread Martin Morgan
retama wrote: Patrick Burns kindly provided an article about this issue called 'The R Inferno'. However, I will expand a little bit my question because I think it is not clear and, if I coud improve the code it will be more understandable to other users reading this messages when I will paste it

Re: [R] Loop avoidance and logical subscripts

2009-05-21 Thread retama
Patrick Burns kindly provided an article about this issue called 'The R Inferno'. However, I will expand a little bit my question because I think it is not clear and, if I coud improve the code it will be more understandable to other users reading this messages when I will paste it :) In my examp