inst/snippet/orthonormal-s1.R

x <- c(1, 1, 1)
y <- c(1, 1, -2)
w <- y - project(y, x)
dot(x, w)                                    # confirm normality
# these two column vectors are orthogonal and have correct span
cbind( x / vlength(x), w / vlength(w) )
rpruim/fastR2 documentation built on Nov. 11, 2023, 7:32 a.m.