Details pending. A recent discussion on the topic.

Simple Example

# load libraries
library(soilDB)
library(sharpshootR)
library(plyr)
library(igraph)
library(RColorBrewer)

# load sample data associated with the amador soil series
data(amador)

# map unit keys, component names, component percentages
head(amador)
mukey compname comppct_r
461845 amador 45
461845 gillender 40
461845 pardee 3
461845 peters 3
461845 ranchoseco 3
461845 vleck 3
# convert into adjacency matrix, based on no. times component co-occur
m.1 <- component.adj.matrix(amador, method='occurrence')
print(m.1)
##            amador auburn bellota exchequer gillender hornitos pardee pentz peters ranchoseco vleck
## amador          0      2       1         4         2        4      2     7      4          2     2
## auburn          0      0       0         0         0        0      0     2      2          0     0
## bellota         0      0       0         0         0        0      0     1      0          0     0
## exchequer       0      0       0         0         0        4      0     4      0          0     0
## gillender       0      0       0         0         0        0      2     0      2          2     2
## hornitos        0      0       0         0         0        0      0     4      0          0     0
## pardee          0      0       0         0         0        0      0     0      2          2     2
## pentz           0      0       0         0         0        0      0     0      2          0     0
## peters          0      0       0         0         0        0      0     0      0          2     2
## ranchoseco      0      0       0         0         0        0      0     0      0          0     2
## vleck           0      0       0         0         0        0      0     0      0          0     0
## attr(,"method")
## [1] "occurrence"
# convert into adjacency matrix, weighted by component percent
m.2 <- component.adj.matrix(amador)
print(round(m.2, 2))
##            amador auburn bellota exchequer gillender hornitos pardee pentz peters ranchoseco vleck
## amador          0      0    0.01      0.03       0.2     0.03   0.01  0.04   0.02       0.01  0.01
## auburn          0      0    0.00      0.00       0.0     0.00   0.00  0.09   0.21       0.00  0.00
## bellota         0      0    0.00      0.00       0.0     0.00   0.00  0.22   0.00       0.00  0.00
## exchequer       0      0    0.00      0.00       0.0     1.00   0.00  0.61   0.00       0.00  0.00
## gillender       0      0    0.00      0.00       0.0     0.00   0.08  0.00   0.07       0.08  0.08
## hornitos        0      0    0.00      0.00       0.0     0.00   0.00  0.61   0.00       0.00  0.00
## pardee          0      0    0.00      0.00       0.0     0.00   0.00  0.00   0.79       1.00  1.00
## pentz           0      0    0.00      0.00       0.0     0.00   0.00  0.00   0.07       0.00  0.00
## peters          0      0    0.00      0.00       0.0     0.00   0.00  0.00   0.00       0.79  0.79
## ranchoseco      0      0    0.00      0.00       0.0     0.00   0.00  0.00   0.00       0.00  1.00
## vleck           0      0    0.00      0.00       0.0     0.00   0.00  0.00   0.00       0.00  0.00
## attr(,"standardization")
## [1] "max"
## attr(,"metric")
## [1] "jaccard"
## attr(,"method")
## [1] "community.matrix"
# compare two methods
par(mfcol=c(1,2), mar=c(0,0,1,0))
plotSoilRelationGraph(m.1, s='amador')
title('Occurence')
plotSoilRelationGraph(m.2, s='amador')
title('Community Matrix')

# compare vertex scaling methods
par(mfcol=c(1,2), mar=c(0,0,1,0))
plotSoilRelationGraph(m.2, s='amador')
title('Degree')
plotSoilRelationGraph(m.2, s='amador', vertex.scaling.method = 'distance')
title('Distance from "Amador"')

# compute adjacency matrix via community matrix method
m <- component.adj.matrix(amador)
# try a bunch of layouts
par(mfrow=c(2,3), mar=c(0,0,1,0))
plotSoilRelationGraph(m, s='amador', main='Fruchterman-Reingold (default)')
plotSoilRelationGraph(m, s='amador', g.layout=layout_on_grid, main='grid')
plotSoilRelationGraph(m, s='amador', g.layout=layout_in_circle, main='circle')
plotSoilRelationGraph(m, s='amador', g.layout=layout_with_mds, main='MDS')
plotSoilRelationGraph(m, s='amador', g.layout=layout_with_gem, main='GEM')
plotSoilRelationGraph(m, s='amador', g.layout=layout_as_star, main='star')