parGrad: Calculating gradients

Description Usage Arguments Examples

Description

Function calculates in which direction and at what rate a certain parameter changes over depth.

Usage

1

Arguments

depth

numeric vector of depth indication.

par

numeric vector of single environmental parameter (e.g. water temperature).

range

numeric integer indicating the range for which the delta should be calculated, Default: 5.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Generating customized temperature and salinity profile
hydro <- HydroGen(data.frame(temp = c(17,10,6,8,9),
                             salt = c(7,8,9,18,20)),
                             by = 25)
                                
#Calculating salinity and temperature gradient on a 3-meter-range
hydro$tempGrad <- parGrad(depth = seq_along(hydro$temp), par = hydro$temp, range = 3)
hydro$saltGrad <- parGrad(depth = seq_along(hydro$salt), par = hydro$salt, range = 3)

head(hydro, 15)

herrmannrobert/VerDi documentation built on June 10, 2019, 7:32 a.m.