[R] creating matrices from vectors
James Rudge
james_980 at hotmail.com
Sat Nov 15 16:17:30 CET 2008
If I have 4 vectors (a, b, c, and d) each of length 1000, how do I then create 1000 two by two matrices from these vectors, such that:
myMatrix[i] = matrix(c(a[i],b[i],c[i],d[i]),2)
Then I'd like to create a single vector containing the largest eigenvalues of each matrix?
(Sorry I am quite new to R)
Many thanks,
James
_________________________________________________________________
[[elided Hotmail spam]]
More information about the R-help
mailing list