 <p>To create just the strings you need, you could also do:</p> <pre><code> x &lt;- rep(seq(2002, 2014, 1), 4) x &lt;- sort(x) y &lt;- rep(seq(1, 4, 1), 12) rows &lt;- paste(x, y, sep = ".") &gt; rows [1] "2002.1" "2002.2" "2002.3" "2002.4" "2003.1" "2003.2" "2003.3" "2003.4" [9] "2004.1" "2004.2" "2004.3" "2004.4" "2005.1" "2005.2" "2005.3" "2005.4" [17] "2006.1" "2006.2" "2006.3" "2006.4" "2007.1" "2007.2" "2007.3" "2007.4" [25] "2008.1" "2008.2" "2008.3" "2008.4" "2009.1" "2009.2" "2009.3" "2009.4" [33] "2010.1" "2010.2" "2010.3" "2010.4" "2011.1" "2011.2" "2011.3" "2011.4" [41] "2012.1" "2012.2" "2012.3" "2012.4" "2013.1" "2013.2" "2013.3" "2013.4" [49] "2014.1" "2014.2" "2014.3" "2014.4" </code></pre>