wnba <- read.table("http://www.stat.ufl.edu/~winner/data/wnba_ht_wt.dat", header=F,col.names=c("id","height","weight")) attach(wnba) ### Matrix Notes: ### t(A) is the transpose of A ### A %*% B gives matrix multiplication of A and B ### solve(A) gives the inverse of A Y <- as.matrix(weight) X0 <- rep(1,length(height)) X <- as.matrix(cbind(X0,height))