Ned,

Use 'stack'

sat_image <- stack( inImage, bandlist[1] )

If inImage is a filename of a multi-band file, then

sat_image <- stack( inImage, -1)

should create a stack of all bands (so that you do not need that loop).

Robert

On Tue, Sep 22, 2009 at 11:28 AM, Ned Horning <[email protected]> wrote:

> Hi - I have a script that uses stackFromFiles that used to be part of the
> Raster package but it's not any more. Ca anyone out there let me know the
> new way to do this:
>
> sat_image <- stackFromFiles(c(inImage), c(bandlist[1]))
> for (y in 2:numbands) {
>  sat_image <- addFiles(sat_image, c(inImage), c(bandlist[y]))
> }
>
> Any help is appreciated.
>
> Ned
>
> _______________________________________________
> R-sig-Geo mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to