compare.datasets(y1, y2, n.cut=c(5, 10, 20, 50),
max.cut=c(2, 5, 10, 20, 50))
## S3 method for class 'compare.datasets':
plot(x, y, subset=1:nrow(x$obs), ...)compare.datasets produce by function
compare.datasets.xyplot.compare.datasets returns a list with two names elements:plot.compare.datasets returns an object of class trellis which may be plotted.compare.datasets compares two datasets. It summarise the species profile (number of occurences etc.) and sample profile (number of species in each sample etc.) of dataset 1. For those species recorded in dataset 1 it also provides summaries of their occurence and abundance in dataset 2. It is useful diagnostic for checking the conformity between core and training set data, specifically for identifying core taxa absent from the training set, and core samples with portions of their assemblage missing from the training set. Function write.list.Excel saves the output of compare.datasets in Excel format for more convenient browsing.
plot.compare.datasets provides a simple visualisation of the comparisons. It produces a matrix of plots, one for each sample in dataset 1, showing the abundance of each taxon in dataset 1 (x-axis) against the N2 value of that taxon in dataset 2 (y-axis, with symbols scaled according to abundance in dataset 2. The plots shouls aid identification of samples with high abundance of taxa that are rare (low N2) or have low abundance in the training set. Taxa thar are absent from the training set are indicated with a red "+".write.list.Excel to save the output of compare.datasets in Excel format.# compare diatom data from core from Round Loch of Glenhead
# with SWAP surface sample dataset
data(RLGH)
data(SWAP)
result <- compare.datasets(RLGH$spec, SWAP$spec)
result
#save comparison to Excel for more convenient browsing
write.list.Excel(result, "Comparison.xls")
#visualise the comparison
plot(result, RLGH$spec)Run the code above in your browser using DataLab