Description Usage Arguments Details Value Author(s) References Examples
Append the atomic value val
to the vector x
until it is of length l
.
1 2 |
x |
The vector to append values to. |
l |
The resulting length of the vector after appending. |
val |
The scalar value to append. |
Postpad appends the value val
to the end of vector x
until it has length l
. Prepad appends the value val
to the beginning of vector x
until it has length l
.
If the length of x
is greater than l
, elements of x
are removed until a vector of length l
is obtained. The function postpad
removes elements from the end of the vector; the function prepad
removes
values from the beginning of the vector.
This function removes the "dim"
attribute of x
, if present.
A vector of length l
. If x
and val
are not of the same type, implicit type conversion rules apply,
see references.
Geert van Boxtel
https://www.r-bloggers.com/type-conversion-and-you-or-and-r/.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.