Learn R Programming

medfate (version 4.7.0)

soil_redefineLayers: Redefine soil layer widths

Description

Allows redefining soil layer widths of an input data frame of soil parameters.

Usage

soil_redefineLayers(x, widths = c(300, 700, 1000, 2000))

Value

A data frame or soil object with soil parameters, depending on the class of x.

Arguments

x

A data frame of soil parameters (see an example in defaultSoilParams) or an object of class soil.

widths

A numeric vector indicating the desired layer widths, in mm.

Author

Víctor Granda, EMF-CREAF

Miquel De Cáceres Ainsa, EMF-CREAF

Details

If an initialized soil is supplied, its hydraulic parameters will be recalculated and the value of state variables will be lost.

See Also

soil, defaultSoilParams

Examples

Run this code
# Define initial soil with 5 layers
spar <- defaultSoilParams(5)
spar

# Redefine to four layers
soil_redefineLayers(spar)

# Same but after soil parameter initialization
examplesoil <- soil(spar)
examplesoil

soil_redefineLayers(examplesoil)

Run the code above in your browser using DataLab