From a43fb95cc429737d81438c78afdc02e6f8931511 Mon Sep 17 00:00:00 2001 From: kdpsingh Date: Fri, 20 May 2016 02:30:10 -0400 Subject: [PATCH] Minor grammar fix -- removed "type of" There was a missing word after "type of" -- potentially you meant "type of assignment." I removed "type of" to make it more concise. --- iteration.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iteration.Rmd b/iteration.Rmd index 92609a2..afd6eb7 100644 --- a/iteration.Rmd +++ b/iteration.Rmd @@ -261,7 +261,7 @@ for (i in seq_along(means)) { str(output) ``` -But this type of is not very efficient because in each iteration, R has to copy all the data from the previous iterations. In technical terms you get "quadratic" ($O(n^2)$) behaviour which means that a loop with three times as many elements would take nine times ($3^2$) as long to run. +But this is not very efficient because in each iteration, R has to copy all the data from the previous iterations. In technical terms you get "quadratic" ($O(n^2)$) behaviour which means that a loop with three times as many elements would take nine times ($3^2$) as long to run. A better solution to save the results in a list, and then combine into a single vector after the loop is done: