Re: [R] apply to a matrix and insert in the middle of an array

2011-10-09 Thread David Winsemius
On Oct 9, 2011, at 1:04 PM, Maas James Dr (MED) wrote: If possible I'd like to produce a function that applies a formula to a column in a matrix (essentially calculating the mse) and then inserts it between values of a an array ... confusing I know, here is an example of what I'm trying to

[R] apply to a matrix and insert in the middle of an array

2011-10-09 Thread Maas James Dr (MED)
If possible I'd like to produce a function that applies a formula to a column in a matrix (essentially calculating the mse) and then inserts it between values of a an array ... confusing I know, here is an example of what I'm trying to accomplish: ## create a matrix (a <- matrix(c(3,6,4,8,5,9,1