Reading the actual help of the state of the eigenfunction that $vectors is: is a "p * p-matrix whose columns contain eigenvectors x". The actual vector corresponding to the largest eigenvalue is the 1st column of $vectors . To get it straight:
> B <- matrix(1:9, 3) > eig <- eigen(B) > eig$vectors[,which.max(eig$values)] [1] -0.4645473 -0.5707955 -0.6770438
Note that @ user2080209's answer does not work: it will return the first line.
source share