I am using the R programming language. I am learning about how to loop a procedure and store the results into a table. For this example, I first generated some data: