vertical.aggregate.brick.within.depth: Aggregates with a mean or an addition on the vertical profile...

Description Usage Arguments Value Note See Also Examples

View source: R/aggregate.brick.at.depth.R

Description

Aggregates with a mean or an addition on the vertical profile the values of a 'brick' within a certain depth and returns the vertical aggregated map

Usage

1
2
3
vertical.aggregate.brick.within.depth(x, depth = NULL, layers = NULL,
  i0 = NULL, verify = FALSE, FUN = identity, divide.by.depth = FALSE,
  ...)

Arguments

x

a 'RasterBrick' or a three-dimensional array

depth

depth map, generally a 'RasterLayer' object

layers

vector of layer thickness

i0

a 'Raster' containing the number of soil laver just over the bedrock. Default is NULL and is then calculated.

verify

logical. Default is FALSE. If it is TRUE, it verifies that function is working correctly.

FUN

function used for aggregation. If missing, identity is the default value.

divide.by.depth

logical. If TRUE the function returns the 'mean' value, otherwise a a cumulate value. Default is FALSE.

...

further argument for FUN

Value

a list of 'Raster' maps:

i0 a 'Raster' containing the number of soil laver just over the bedrock

z0 a 'Raster' containing the depth of the center of the i0-th layer

result a 'Raster' containing the aggregated map

Note

x and depth or i0 must cover the same spatial region.

See Also

getvalues.brick.at.depth,brick

Examples

1
2
3
4
5
6
7
library(geotopbricks)
# The examples is the following R script conteined 
# in a 'inst' directory of the package source
f <- system.file("doc/examples/example.vertical.aggregate.brick.within.depth.R",
package="geotopbricks")
#  source(f) # Uncomment this line to run the example. 
# You can copy the example file using file.copy(from=f,to=....,...) See file.copy documentation

geotopbricks documentation built on May 29, 2017, 9:48 a.m.