parent
62b6e171f3
commit
7bb8acf72a
|
@ -137,7 +137,7 @@ That's all there is to the for loop! Now is a good time to practice creating som
|
||||||
for (i in seq_along(x)) {
|
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))
|
||||||
|
|
||||||
x <- runif(100)
|
x <- runif(100)
|
||||||
out <- vector("numeric", length(x))
|
out <- vector("numeric", length(x))
|
||||||
|
|
Loading…
Reference in New Issue