Learn R Programming

aqp (version 0.80)

unroll: Unroll Genetic Horizons

Description

Generate a descretized vector of genetic horizons along a user-defined pattern.

Usage

unroll(top, bottom, prop, max_depth, bottom_padding_value = NA)

Arguments

top
vector of upper horizon boundaries
bottom
vector of lower horizon boundaries
prop
vector of some property to be "unrolled" over a regular sequence
max_depth
maximum depth to consider
bottom_padding_value
value to use when padding missing data

Value

  • a vector of "unrolled" property values

Details

This function is used internally by several higher-level components of the soil package.

References

http://casoilresource.lawr.ucdavis.edu/

See Also

soil.slot

Examples

Run this code
data(sp1)

# subset a single soil profile:
sp1.1 <- subset(sp1, subset=id == 'P001')

# demonstrate how this function works
x <- with(sp1.1, unroll(top, bottom, prop, max_depth=50))
plot(x, 1:length(x), ylim=c(55,0), type='b', cex=0.5)

Run the code above in your browser using DataLab