LoadMonthlyFiles: Load Monthly Rasters

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Load a set of 12 raster files for a specified variable

Usage

1
 LoadMonthlyFiles(folder, ext='', varbl='', format='')

Arguments

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

Details

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)

Value

A list of rasters from which a stack can be created.

Author(s)

Julian Ramirez, dawnpatrolmustaine@gmail.com

See Also

BioCalc

Examples

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

BioCalc documentation built on May 2, 2019, 4:41 p.m.