extract.raster.cortad: CoRTAD's raster extraction

Description Usage Arguments Value Examples

View source: R/extract.raster.cortad.R

Description

This function crops a multi-layer raster object specified by a variable name and an extent object and then calculates values using a formula.

Usage

1
extract.raster.cortad(nc, var, ext, fxn)

Arguments

nc

a character vector of the destination of CoRTAD's .nc file

var

a character vector of the variable (e.g. 'WeeklySST')

ext

a vector of four numbers representing the extent (i.e. xmin, xmax, ymin, ymax)

fxn

a function (e.g. 'mean', 'min', 'max', 'sd')

Value

a Raster object

Examples

1
2
3
4
rs <- extract.raster.cortad(nc = "cortadv6_WeeklySST.nc",
                            var = "WeeklySST",
                            ext = c(47 , 57, 22.9, 30.9),
                            fxn = mean)

brisneve/THE documentation built on May 21, 2019, 11:09 a.m.