Although you *do* have to re-assign the dimensions, otherwise the result is just a flat vector, ie slice <- A[ outer(v, dim(A)[1]*( 1:prod(dim(A)[-1])-1 ), '+') ] dim(slice) <- dim(A)[-1]
Steve Jaffe wrote: > > A[ outer(v, dim(A)[1]*( 1:prod(dim(A)[-1])-1 ), '+') ] > -- View this message in context: http://www.nabble.com/array-slice-notation--tp24814643p24815435.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.