Learn R Programming

aqp (version 1.27)

unique: Get the indexes of unique profiles in a SoilProfileCollection

Description

Calculate MD5 hash of each profile in a SoilProfileCollection for the specified variables.

Usage

# S4 method for SoilProfileCollection
unique(x, vars)

Arguments

x

a SoilProfileCollection

vars

Variables to consider in uniqueness.

Examples

Run this code
# NOT RUN {
data(sp5)

# find indices where all specified vars are unique
#  these match the indices of all profiles in sp5
#  therefore, all profiles in sp5 are unique

all(unique(sp5, vars=c("id","sand","silt","clay") == 1:length(sp5)))

# }

Run the code above in your browser using DataLab