correction -- that would work for a single row, if you want the result to be an array with one fewer dimensions. But in general you get an array of the same dimension you started with (where the first dimension may be length 1). So:
dim(slice) <- c(length(v), dim(arr)[-1]) Although you *do* have to re-assign the dimensions, otherwise the result is just a flat vector, ie -- View this message in context: http://www.nabble.com/array-slice-notation--tp24814643p24816190.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.