Skip to content
Prev 275676 / 398506 Next

Trying to create a function to extract values from a matrix

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 <kshughes at ncsu.edu> wrote: