| shuffle | R Documentation |
This function shuffles the horizon data or physical ordering of horizons within profiles of a SoilProfileCollection object.
shuffle(x, mode = c("data", "horizon"), replace = FALSE, size = NULL)
x |
|
mode |
character, one of 'data' or 'horizon'
|
replace |
logical, replacement argument to |
size |
integer, size argument to |
SoilProfileCollection
data('osd', package = 'aqp')
o <- osd
# shuffling of data only
o.d <- shuffle(o, mode = 'data')
# shuffling of horizons
o.h <- shuffle(o, mode = 'horizon')
# shuffling / sampling with replacement
o.h2 <- shuffle(o, mode = 'horizon', replace = TRUE)
# add method to IDs
profile_id(o.d) <- sprintf("%s\ndata", profile_id(o.d))
profile_id(o.h) <- sprintf("%s\nhz", profile_id(o.h))
profile_id(o.h2) <- sprintf("%s\nhz R", profile_id(o.h2))
# combine into single SPC
g <- combine(o, o.d, o.h, o.h2)
# graphical comparison
op <- par(mar = c(0, 0, 0.5, 2.5))
plotSPC(g, name.style = 'center-center', cex.names = 0.66, width = 0.3, cex.id = 0.75)
par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.