Learn R Programming

goeveg (version 0.4.2)

synsort: Sorting functions for synoptic tables

Description

Synoptic tables are a tool for interpretation of cluster species composition. This function provides sorting options for synoptic tables, sorting criteria can be either values in synoptic tables, such as frequencies, as well as combined criteria with considering differential character, too. Sorting algorithm aims to sort species in given cluster column order to blocked structure. Thereby, species with high frequencies and/or differential character are displayed blocked for each cluster or several neighbouring clusters.

Usage

synsort(syn1, syn2 = syn1, cluster, method = "allspec", min1 = 0,
  min2 = 0, relate2 = "entire")

Arguments

syn1

Input synoptic table 1 (as dataframe) with priority entries for sorting. Usually dataframe from syntable function output, but function should work with every synoptic table input, as long as formats are appropriate. The values of this table will be displayed in the final output table.

syn2

Optional second input table with additional sorting criteria. Note that values of second input table will be considered in sorting, but not be displayed in final synoptic table with method = "allspec".

cluster

Integer vector with classification cluster identity. Ensure matching order of cluster identity and samples in dataframe for correct allocation of cluster numbers to samples.

method

Sorting algorithm (method = c("allspec", "p_diff", "n_diff", "pn_diff", "accspec", "all_diff")). See Details.

min1

Treshold minimum value for considering species of syn1 in ordering algorithm. Species below that minimum will neither be considered in algorithm nor displayed in final synoptic table, but will be listed in the $others output.

min2

Treshold minimum value for considering species of syn2 in ordering algorithm. Species below that minimum will neither be considered in algorithm nor displayed in final synoptic table, but will be listed in the $others vector.

relate2

Specifies relation of given second table minimum values to either related to entire dataset (default) or to each cluster only (relate2 = c("entire", "cluster")).

Value

Returns a list composed of:

$output

sorting method description

$species

species sorting criteria

$samplesize

sample sizes in clusters

$syntable

sorted synoptic table

$others

species that failed to be included in the final table due to treshold values given by min1 and min2

$differential

In case of combined sorting with considering differential species character, a table with differential character of species.

Details

Six types of synoptic tables can be created with this function.

With including differential species character as sorting criterion (method = c("p_diff", "n_diff", "pn_diff", "accspec", "all_diff")), input table syn1 must be numeric, the second one with information on differential character (output from syntable function with type="diffspec"). Again, algorithm detects highest cluster values of species in syn1 as base for sorting, but will sort them considering differentiating character criterion (from second input table syn2). Species with high values in syn1 AND differential character will then be listed on the top of a species block. Within differentiating species, prevalence of diagnostic character is considered by favoring positive and/or cluster-specific differential character. Available types are:

method = "p_diff"

creates a synoptic table of diagnostic species with numerical values of input table syn1

method = "accspec"

creates a synoptic table of non-diagnostic species with numerical values of input table syn1

method = "all_diff"

showing all diagnostic and non-diagnostic species

References

Bruelheide, H. (2000): A new measure of fidelity and its application to defining species groups. - Journal of Vegetation Science 11: 167-178.

Chytry, M., Tichy, L., Holt, J., Botta-Dukat, Z. (2002): Determination of diagnostic species with statistical fidelity measures. Journal of Vegetation Science 13: 79-90.

Sokal, R.R. & Rohlf, F.J. (1995): Biometry. 3rd edition Freemann, New York.

Tsiripidis, I., Bergmeier, E., Fotiadis, G. & Dimopoulos, P. (2009): A new algorithm for the determination of differential taxa. - Journal of Vegetation Science 20: 233-240.

See Also

syntable

Examples

Run this code
# NOT RUN {
## Synoptic table of Scheden vegetation data:
library(cluster)
pam1 <- pam(schedenveg, 4)

## Unordered synoptic tables
# Unordered synoptiv percentage frequency table
unordered <- syntable(schedenveg, pam1$clustering, abund = "perc",
                      type = "percfreq")
# Differential species analysis
differential <- syntable(schedenveg, pam1$clustering, abund = "perc",
                         type = "diffspec")
# Fidelity phi
phitable <- syntable(schedenveg, pam1$clustering, abund = "perc",
                     type = "phi")

## Common complete synoptic table: sort by percentage frequency,
## show all species
sorted <- synsort(syn1 = unordered$syntable, cluster = pam1$clustering,
                  method = "allspec", min1 = 0)
sorted             # view results

## Synoptic table, with only positive differentiating species with
## minimum 25% frequency in table
positive <- synsort(syn1 = unordered$syntable, syn2 = differential$syntable,
                    cluster = pam1$clustering, method = "p_diff", min1 = 25)
positive           # view results

## Synoptic table, with percentage frequency (only species >25%) and
## differential character.
complete <- synsort(syn1 = unordered$syntable, syn2 = differential$syntable,
                    cluster = pam1$clustering, method = "all_diff", min1 = 25)
complete

## Synoptic table, species with minimum phi-value of 0.3, show
## percentage frequency
phi_complete <- synsort(syn1 = unordered$syntable, syn2 = phitable$syntable,
                        cluster = pam1$clustering, method = "allspec", min1 = 25, min2 = 0.3)
phi_complete

## Synoptic table with only phi values
phi_table <- synsort(syn1 = phitable$syntable, cluster = pam1$clustering,
                     method = "allspec", min1 = 0.3)
phitable

## Synoptic table showing diagnostic phi phi-values (>=0.3) and
## differential character
phi_diff <- synsort(syn1 = phitable$syntable, syn2 = differential$syntable,
                    cluster = pam1$clustering, method = "all_diff", min1 = 0.3)
phi_diff
# }

Run the code above in your browser using DataLab