[R] array slice notation?
Steve Jaffe
sjaffe at riskspan.com
Tue Aug 4 22:12:22 CEST 2009
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.
More information about the R-help
mailing list