Learn R Programming

aqp (version 2.0.4)

hz_lag: Find lagged horizon values

Description

This function finds adjacent values to a horizon values at lagged distances.

Usage

hz_lag(
  object,
  lag = 1,
  unit = "index",
  idcol = "id",
  depthcols = c("top", "bottom"),
  order = FALSE
)

Value

A data.frame with lagged values.

Arguments

object

a data.frame

lag

integer: number of horizons to lag

unit

character: lag units in index or depth.

idcol

character: column name of the pedon ID within the object.

depthcols

a character vector of length 2 specifying the names of the horizon depths (e.g. c("top", "bottom")).

order

logical: indicating whether or not to order the #'

Author

Stephen Roecker

Details

.

See Also

hz_dissolve(), hz_intersect(), hz_segment()