plotTransect: Plot a collection of Soil Profiles linked to their position...

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/transect-functions.R

Description

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

Usage

1
2
3
4
5
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(loafercreek, package='soilDB')

x <- loafercreek[1:10, ]
coordinates(x) <- ~ x_std + y_std
proj4string(x) <- '+proj=longlat +datum=NAD83'

par(mar=c(4,3,1,1))
plotTransect(x, 'elev_field', crs=CRS('+proj=utm +zone=10 +datum=NAD83'), max.depth=185)

## End(Not run)

sharpshootR documentation built on May 31, 2017, 2:05 a.m.