@ Ido Tamir: Yes, this works but how to store the X prime and Y prime for i=2 and then for i=3 and so on as a list of lists is my question. If you run my original code you get two matrices with bootstrapped values and then I would like to do the same for i= 1:1000 and store them
• 0 views
•
link
Did you try replacing
iwith1:1000? Or just deletingi? You could do this much more cleanly, if you give a clear explanation of what you're trying to do it'll be easier for someone to help.@ Ben : I want 1000 bootstrapped datasets, Xprime having only 5 columns and all rows and Y prime having 5 columns and all rows from the original dataset X . So from the original dataset by bootstrapping there will be 1000 datasets. The above function gives this for i=1. How to do this 1000 times and store the datasets as a list or in other possible ways?
How is your question related to bioinformatics?
To get more informative answer you can trying asking here: http://stackoverflow.com/questions/tagged/r
Rather than send people elsewhere, why not add the context you think is missing, along with the answer? People use R in bioinformatics all the time, and R forums can be completely obtuse, thus having the freedom to ask an R question in a bioinformatics community can be helpful.
See A brief introduction to “apply” in R