# append

##### Vector Merging

Add elements to a vector.

- Keywords
- manip

##### Usage

`append(x, values, after = length(x))`

##### Arguments

- x
the vector the values are to be appended to.

- values
to be included in the modified vector.

- after
a subscript, after which the values are to be appended.

##### Value

A vector containing the values in `x`

with the elements of
`values`

appended after the specified element of `x`

.

##### References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
*The New S Language*.
Wadsworth & Brooks/Cole.

##### Examples

`library(base)`

```
# NOT RUN {
append(1:5, 0:1, after = 3)
# }
```

*Documentation reproduced from package base, version 3.4.3, License: Part of R 3.4.3*

### Community examples

**dtuers**at Jun 27, 2020 base v3.6.2

randVec <- c() for(i in 1:10){ randNorm <- rnorm(1,0,1) randVec <- append(randVec,randNorm) } print(randVec)