stack{raster} of n Raster Layers
<p>I have a question about <code>stack()</code> Raster Layers.</p>

<p>Usually I <code>stack()</code> Raster Layers like that: </p>

<pre><code>stack(RasterLayer1,RasterLayer2,RasterLayer3) # e.g. for 3 Layers
</code></pre>

<p>My Question is, how can I <code>stack()</code> Raster Layers without typing in every Raster Layer? </p>

<p>For example: <code>n</code> is the amount of Raster Layers (e.g. 12), all named <code>band</code>.</p>

<p>I created <code>n-Raster</code> Layers and now I want to stack all without typing n-times the Name of the Raster Layers. So instead of typing: </p>

<pre><code>stack(band1,band2,band3,band4,band5,band6,band7,band8,band9,band10,band11,band12)
</code></pre>

<p>I want to short that by <code>stack(band[n])</code>, but that doesn't work.</p>

<p>And if I create a list of all bands, I can't stack that list, because they don't appear in my Working Directory because I just created them.</p>

<p>Can anyone help me, please?</p>