Hi all~ I have a bit of stupid question. And I promise, I have struggled through this and it sort of pains me to post this question...
I have the following vector which is are the estimated parameter values output from "optim". $Rates [1] 0.006280048 0.330934659 I want to match the order in the vector by the number in the following matrix: $Index.matrix ALPHA 1 1 BETA 2 2 In other words, the first value in $Rates should go wherever there is a "1" in the $Index.matrix. And the second value should go wherever there is a "2", and so on. I have some pretty hacky solutions, but I wanted to see if there was an easy way to do this that I am completely missing. Thanks and all the best, Jeremy ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.