View source: R/implicitExpansion.R
expandArray | R Documentation |
Expand an array to a given dimension by repeating its entries in the directions where the array has dimension one.
expandArray(x, dy)
x |
An object that is coerced to array. |
dy |
The dimensions it is to be expanded to. |
Throws an error if the array and dimensions are not compatible.
An array that consists of the entries in x
, with dimension dy
.
expandedDim
, mmapply
x <- 1:3 expandArray(x, c(3,4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.