Re: [R] Changing a for loop to a function using sapply

2012-10-21 Thread arun
tatatacggatct"    #[18] "ttcattatagctaaatgcagcagcacagatcaatagctctgcttcgttgtcc" #[19] "cagggtgtactaggacgcgactcttgcattcgggc" #[20] "agcgacctaccgcccctccaataaagttgtcgttactgagtttcgcgccacgagttgttg"   A.K. - Original Message - From: Rui Barradas

Re: [R] Changing a for loop to a function using sapply

2012-10-21 Thread Rui Barradas
Hello, You're right an _explicit_ for loop is not necessary in your case, but note that the *apply functions are just for loops in disguise. They are also the prefered R idiom. In this case I've used ?replicate, a function of the *apply family. To be more readable it uses a new function, calle

[R] Changing a for loop to a function using sapply

2012-10-21 Thread Ed
Apparently there is one or more concepts that I do not fully understand from the descriptions of a function and the apply material. I have been reading the mail from this forum and have learned much but, in this case, what I have been reading here and from the manual isn't enough. The followin