Re: [R] Simplify the loop over the 3rd dimension of a 3D array

2018-07-12 Thread David Winsemius
> On Jul 12, 2018, at 9:40 AM, Duncan Murdoch wrote: > > On 12/07/2018 11:34 AM, Marine Regis wrote: >> Hello all, >> Is there an efficient way to simplify the loop over the 3rd dimension of a >> 3D array ? I want to keep the loop over the "time". Here is the code: >> set.seed(12345) >> ind <-

Re: [R] Simplify the loop over the 3rd dimension of a 3D array

2018-07-12 Thread Duncan Murdoch
On 12/07/2018 11:34 AM, Marine Regis wrote: Hello all, Is there an efficient way to simplify the loop over the 3rd dimension of a 3D array ? I want to keep the loop over the "time". Here is the code: set.seed(12345) ind <- 10 time_seq <- seq(0, 8, 1) col_array <- c(paste("time_", time_seq, s