Calculate the sum of squares of the elements of a numeric vector.
sqsum(x)
x
The sum of squared elements of x.
Beck, M.
x <- 1:5 sqsum(x) # 55 y <- rep(2,4) sqsum(y) # 16