Description Usage Arguments Details Value Author(s) See Also Examples
Load a set of 12 raster files for a specified variable
1 | LoadMonthlyFiles(folder, ext='', varbl='', format='')
|
folder |
The folder in which your input files are stored |
ext |
The file extension of your input raster files |
varbl |
The name of your variable: tmin, tmax, tmean, prec |
format |
The format of your input files. Can be raster, ascii, BIL, or any supported by the raster package |
The function only works with prefixes tmin, tmax, tmean, and prec. If your files have any other prefix, please change accordingly. In the case of tmean, if the file does not exist, the program automatically calculates it as the average of tmin and tmax. This function is based upon several features of the raster package (available at sourceforge.net)
A list of rasters from which a stack can be created.
Julian Ramirez, dawnpatrolmustaine@gmail.com
1 2 3 4 5 6 | # Folder where your data is stored (in ascii format, for example)
# dir <- "C://MyMonthlyData//"
#
# Suppose you want to load precipitation (prec) grids
# rlist <- LoadMonthlyFiles(dir, ext='.asc', varbl='prec', format='ascii')
# rlist
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.