plotTransect {sharpshootR}R Documentation

Plot a collection of Soil Profiles linked to their position along some gradient (e.g. transect).

Description

Plot a collection of Soil Profiles linked to their position along some gradient (e.g. transect).

Usage

plotTransect(s, grad.var.name, transect.col = "RoyalBlue", 
tick.number=7, y.offset = 100, 
scaling.factor = 0.5, 
distance.axis.title = "Distance Along Transect (km)", 
crs = NULL, grad.axis.title = NULL, ...)

Arguments

s

a SoilProfileCollection object

grad.var.name

the name of a site-level attribute containing gradient values

transect.col

color used to plot gradient (transect) values

tick.number

number of desired ticks and labels on the gradient axis

y.offset

vertical offset used to position profile sketches

scaling.factor

scaling factor used to adjust profile sketches

distance.axis.title

a tital for the along-transect distances

crs

an optional CRS object used to convert coordinates into a planar system

grad.axis.title

a title for the gradient axis

...

further arguments passed to plotSPC

Details

Depending on the nature of your SoilProfileCollection and associated gradient values, it may be necessary to tinker with figure margins, y.offset and scaling.factor.

Value

An invisibly-returned data.frame object:

scaled.grad

scaled gradient values

scaled.distance

cumulative distance, scaled to the interval of 0.5, nrow(coords) + 0.5

distance

cumulative distance computed along gradient, e.g. transect distance

variable

sorted gradient values

x

x coordinates, ordered by gradient values

y

y coordinate, ordered by gradient values

grad.order

a vector index describing the sort order defined by gradient values

Note

This function is very much a work in progress, ideas welcome!

Author(s)

D.E. Beaudette

Examples

## Not run: 
##D data(loafercreek, package='soilDB')
##D 
##D x <- loafercreek[1:10, ]
##D coordinates(x) <- ~ x_std + y_std
##D proj4string(x) <- '+proj=longlat +datum=NAD83'
##D 
##D par(mar=c(4,3,1,1))
##D plotTransect(x, 'elev_field', crs=CRS('+proj=utm +zone=10 +datum=NAD83'), max.depth=185)
## End(Not run)

[Package sharpshootR version 0.8-4 Index]