[R-sig-Geo] mass importing rasters

Martin Brandt martin_brandt at gmx.net
Mon Sep 13 09:28:59 CEST 2010


This is a great solution, thanks everyone!



-----Ursprüngliche Nachricht-----
Von: Robert J. Hijmans [mailto:r.hijmans at gmail.com] 
Gesendet: Sonntag, 12. September 2010 23:18
An: Martin Brandt
Cc: r-sig-geo at stat.math.ethz.ch
Betreff: Re: [R-sig-Geo] mass importing rasters

You have not said what type of objects you want, but here's one option:

library(raster)
s <- stack(list.files(pattern='*.tif'))

Robert

On Sun, Sep 12, 2010 at 10:29 PM, Martin Brandt <martin_brandt at gmx.net>
wrote:
> a simple question:
> how can I automatically import a huge bunch of rasters (Geotiffs) to R?
> With a for loop? I didn't find how to do that in the docs..
> Each variable name should be the original raster name, but that's not
> important.
>
> greets,
> Martin
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list