Description Usage Arguments Details Value Author(s) Examples

Reshape matrix or array.

1 |

`A` |
matrix or array containing the original data |

`...` |
numeric dimensions for the result |

In the first example below, an `m`

-by-`n`

matrix is created whose
elements are taken column-wise from `A`

. An error occurs if `A`

does not have *m*n* elements.

In the second example below, an `n`

-dimensional array with the same
elements as `A`

but reshaped to have the size
`m`

-by-`n`

-by-`p`

. The product of the specified dimensions
must be the same as `prod(size(A))`

.

In the third example below, an `n`

-dimensional array with the same
elements as `A`

but reshaped to `siz`

, a vector representing the
dimensions of the reshaped array. The quantity `prod(siz)`

must be
the same as `prod(size(A))`

.

Returns matrix (or array) of requested dimensions containing the elements
of `A`

.

P. Roebuck proebuck@mdanderson.org

1 2 3 4 5 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.