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