diagnosticPropertyPlot {sharpshootR}R Documentation

Diagnostic Property Plot

Description

Generate a graphical description of the presence/absence of soil diagnostic properties.

Usage

diagnosticPropertyPlot(f, v, k, grid.label='pedon_id', dend.label='pedon_id')
diagnosticPropertyPlot2(f, v, k, grid.label='pedon_id')

Arguments

f

a SoilProfileCollection object

v

a character vector of site-level attribute names that are boolean (e.g. TRUE/FALSE) data

k

an integer, number of groups to highlight

grid.label

the name of a site-level attribute (usually unique) annotating the y-axis of the grid

dend.label

the name of a site-level attribute (usually unique) annotating dendrogram terminal leaves

Details

This function attempts to display several pieces of information within a single figure. First, soil profiles are sorted according to the presence/absence of diagnostic features named in v. Second, these diagnostic features are sorted according to their distribution among soil profiles. Third, a binary grid is established with row-ordering of profiles based on step 1 and column-ordering based on step 2. Blue cells represent the presence of a diagnostic feature. Soils with similar diagnostic features should 'clump' together. See examples below.

Value

a list is silently returned by this function, containing:

rd

a data.frame containing IDs and grouping code

profile.order

a vector containing the order of soil profiles (row-order in figure), according to diagnostic property values

var.order

a vector containing the order of variables (column-order in figure), according to their distribution among profiles

Author(s)

D.E. Beaudette and J.M. Skovlin

See Also

multinominal2logical

Examples

## Not run: 
##D # sample data, an SPC
##D data(gopheridge, package='soilDB')
##D 
##D # get depth class
##D sdc <- getSoilDepthClass(gopheridge)
##D site(gopheridge) <- sdc
##D 
##D # diagnostic properties to consider, no need to convert to factors
##D v <- c('lithic.contact', 'paralithic.contact', 'argillic.horizon', 
##D 'cambic.horizon', 'ochric.epipedon', 'mollic.epipedon', 'very.shallow',
##D 'shallow', 'mod.deep', 'deep', 'very.deep')
##D 
##D # base graphics
##D x <- diagnosticPropertyPlot(gopheridge, v, k=5)
##D 
##D # lattice graphics
##D x <- diagnosticPropertyPlot2(gopheridge, v, k=3)
##D 
##D # check output
##D str(x)
## End(Not run)

[Package sharpshootR version 0.8-4 Index]