Skip to content
Justice Tech School

Scaling and Cumulative Values

scale standardises, cumsum and cumprod accumulate.

Example
x <- c(10, 20, 30)
print(as.vector(scale(x)))
print(cumsum(x)); print(cumprod(1:5))
print(diff(c(1, 4, 9, 16)))

Exercise

Standardise.

(x)

Quiz Test

What does diff do?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.