| @@ -130,7 +130,7 @@ That's all there is to the for loop! Now is a good time to practice creating som | |||||||
|      |      | ||||||
|     x <- sample(100) |     x <- sample(100) | ||||||
|     sd <- 0 |     sd <- 0 | ||||||
|     for (i in seq_along(out)) { |     for (i in seq_along(x)) { | ||||||
|       sd <- sd + (x[i] - mean(x)) ^ 2 |       sd <- sd + (x[i] - mean(x)) ^ 2 | ||||||
|     } |     } | ||||||
|     sd <- sqrt(sd) / (length(x) - 1) |     sd <- sqrt(sd) / (length(x) - 1) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user