Fun with the New Zealand Soil Texture Triangle
To install, run:
remotes::install_github("manaakiwhenua/nztt")
# Load example data
data(wairau)
# Calculate texture classes
tx <- texture_class(clay = wairau$clay, sand = wairau$sand, silt = wairau$silt)
print(tx)
library(dplyr)
data(wairau)
wairau %>%
select(id, clay, sand, silt) %>%
mutate(
texture = texture_class(clay = clay, sand = sand, silt = silt)$name
)