inst/snippet/concrete-lm1a.R

y <- concrete$strength
n <- length(y); v0 <- rep(1,n)
v1 <- concrete$limestone - mean(concrete$limestone)
v2 <- concrete$water - mean(concrete$water)
project(y,v0,type='v')
mean(y)
project(y,v1,type='l') / vlength(v1)
project(y,v2,type='l') / vlength(v2)

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 1, 2019, 11:18 p.m.