Description Usage Arguments Details Value Examples
Copies a vector into a matrix
1 2 3 |
x |
The vector to be copied |
times |
Number of copies of the vector to bind together |
dimnames |
List specifying row and column names |
This is a convenience function for binding together multiple copies
of the same vector. The intended usage is for situations where one might
ordinarily use rbind
or cbind
, but the work is done by the
matrix
function. Instead of needing to input multiple copies of the
input vector x
(as one would for rbind
), one only needs to
specify the number of times
that the vector should be copied.
For rowCopy
, the output is a matrix with times
rows
and length(x)
columns, in which each row contains the vector x
.
For colCopy
, each column corresponds to the vector x
.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.