I understand the sign of the eigen vectors / PCA rotations can be positive or negative (see here or here).
But I am curious why the following two approaches yield different results, from numerical method perspective?
> d = iris[,1:2]
> pca = prcomp(d)
> r = eigen(cov(d))
> r$vectors
[,1] [,2]
[1,] -0.99640834 -0.08467831
[2,] 0.08467831 -0.99640834
> pca$rotation
PC1 PC2
Sepal.Length 0.99640834 0.08467831
Sepal.Width -0.08467831 0.99640834