Description Usage Arguments Details Value Note Author(s) Examples
View source: R/transect-functions.R
Plot a collection of Soil Profiles linked to their position along some gradient (e.g. transect).
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, ...)
|
s |
a |
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 |
grad.axis.title |
a title for the gradient axis |
... |
further arguments passed to |
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
.
An invisibly-returned data.frame
object:
scaled gradient values
cumulative distance, scaled to the interval of 0.5, nrow(coords) + 0.5
cumulative distance computed along gradient, e.g. transect distance
sorted gradient values
x coordinates, ordered by gradient values
y coordinate, ordered by gradient values
a vector index describing the sort order defined by gradient values
This function is very much a work in progress, ideas welcome!
D.E. Beaudette
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.