Learn R Programming

hyfo (version 1.3.6)

getSpatialMap: Get spatial map of the input dataset.

Description

Get spatial map of the input dataset.

Usage

getSpatialMap(dataset, method = NULL, member = "mean", ...)

Arguments

dataset
A list containing different information, should be the result of reading netcdf file using loadNcdf.
method
A string showing different calculating method for the map. More information please refer to details.
member
A number showing which member is selected to get, if the dataset has a "member" dimension. Default is NULL, if no member assigned, and there is a "member" in dimensions, the mean value of the members will be taken.
...
several arguments including x, y, title, catchment, point, output, name, info, scale, color, type in ?getSpatialMap_mat for details.

Value

A matrix representing the raster map is returned, and the map is plotted.

Details

There are following methods to be selected, "meanAnnual": annual rainfall of each year is plotted. "winter", "spring", "autumn", "summer": MEAN seasonal rainfall of each year is plotted. Month(number 1 to 12): MEAN month rainfall of each year is plotted, e.g. MEAN march rainfall of each year. "mean", "max", "min": mean daily, maximum daily, minimum daily precipitation.

Examples

Run this code
## Not run: 
# #gridData provided in the package is the result of \code {loadNcdf}
# data(tgridData)
# getSpatialMap(tgridData, method = 'meanAnnual')
# getSpatialMap(tgridData, method = 'winter')
# 
# 
# getSpatialMap(tgridData, method = 'winter', catchment = testCat)
# 
# file <- system.file("extdata", "point.txt", package = "hyfo")
# point <- read.table(file, header = TRUE, sep = ',' )
# getSpatialMap(tgridData, method = 'winter', catchment = testCat, point = point)
# ## End(Not run)


# More examples can be found in the user manual on http://yuanchao-xu.github.io/hyfo/

Run the code above in your browser using DataLab