# Create variable with repeating values

21. Sep 2015What I want: A vector with years from 1990 to 2000 with each year appearing 10 times, then 2001 to 2010 5 times per year.

```
years_1 <- rep(1990:2000, each=10)
years_2 <- rep(2001:2010, each=5)
# take them together
years <- append(years_1, years_2)
```