Thanks Michael, this worked great.
Stephen
--
View this message in context:
http://r.789695.n4.nabble.com/Trying-to-create-a-function-to-extract-values-from-a-matrix-tp3944737p3945236.html
Sent from the R help mailing list archive at Nabble.com.
__
R-
This might be an easier method:
suppose your data is in MAT
t(apply(MAT, 1, function(v) eigen(matrix(v, 2))$values))
Your problem is that return() automatically returns the output and
ceases function execution as soon as its hit.
Michael
On Thu, Oct 27, 2011 at 10:44 AM, StephenHughes wrote:
2 matches
Mail list logo