synsort {goeveg}R Documentation

Sorting functions for synoptic tables

Description

This function sorts synoptic tables from syntable function output. Sorting criteria can be either numerical values in synoptic tables, such as cluster-wise frequencies or fidelity measures, as well as combined criteria that also take into account differential character (according to the criteria defined by Tsiripidis et al., 2009).

The algorithm aims to sort species to blocked structure considering the defined criteria and input tables, with the best characterizing species on the top of the block, followed by species with descending importance for plant community description.

Usage

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

Arguments

syn1

Input synoptic table 1, a data frame with numerical data format, usually from syntable function output. See Details for input table format. The values of this table will be displayed in the final output table.

syn2

Optional second input table with additional numeric or differential character sorting criteria.

matrix

Species-sample matrix, already used for syntable function input

cluster

Integer or character vector/factor with classification cluster identity. Ensure matching order of cluster identity and samples in matrix for correct allocation of cluster numbers to samples.

method

Sorting algorithm and synoptic table output options (method = c("allspec", "alldiff")). See Details.

min1

Cluster-wise threshold minimum value for species shown in the final sorted synoptic table. Species below that minimum will be listed in the output ($others section).

min2

Threshold minimum value for considering species values of a numerical second input table syn2. Species below that minimum will not be displayed in final synoptic table, but will be listed in the output ($others section).

Value

Returns an (invisible) list composed of:

Details

Two types of sorted synoptic tables can be created with this function:

Author(s)

Jenny Schellenberg (jschell@gwdg.de)

References

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

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. doi:10.1111/j.1654-1103.2002.tb02025.x

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. doi:10.1111/j.1654-1103.2009.05273.x

See Also

syntable

Examples

### Synoptic table of Scheden vegetation data using syntable()-function:
# classification to create a vector of cluster identity
library(cluster)
pam1 <- pam(schedenveg, 4)


### One input table for sorting:
## Synoptic table with percentage frequency of species in clusters, all species
unordered <- syntable(schedenveg, pam1$clustering, abund = "percentage",
                      type = "percfreq")   # Unordered synoptic percentage frequency table
sorted <- synsort(syn1 = unordered$syntable, matrix = schedenveg,
                  cluster = pam1$clustering, method = "allspec", min1 = 0)
sorted             # view results
## Not run: 
# Export sorted synoptic table
write.csv(sorted$syntab, "syntab.csv")
# Export sorted species-sample matrix with original releve data for postprocessing
write.csv(sorted$samples, "output_species_sample.csv")
## End(Not run)

## Synoptic table with only phi values
phi <- syntable(schedenveg, pam1$clustering, abund = "percentage",
                     type = "phi")         # calculates cluster-wise phi for each species
phi_table <- synsort(syn1 = phi$syntable, matrix = schedenveg, cluster = pam1$clustering,
                     method = "allspec", min1 = 0.3)
phi_table     # view results


### Two numerical tables for sorting:
## Synoptic table showing percentage frequencies, but only for species with minimum phi-value
## of 0.3 AND exclude species with less than 25% percentage frequency

unordered <- syntable(schedenveg, pam1$clustering, abund = "percentage",
                      type = "percfreq")   # Unordered synoptic percentage frequency table
phitable <- syntable(schedenveg, pam1$clustering, abund = "percentage",
                     type = "phi")         # calculates cluster-wise phi for each species
# now sorting and arranging
phi_complete <- synsort(syn1 = unordered$syntable, syn2 = phitable$syntable,
                       matrix = schedenveg, cluster = pam1$clustering, method = "allspec",
                       min1 = 25, min2 = 0.3)
phi_complete      # view results

### Differential species analysis
differential <- syntable(schedenveg, pam1$clustering, abund = "percentage",
                         type = "diffspec")

## Synoptic table with percentage frequency (only species >25%) and
## differential character.
complete <- synsort(syn1 = unordered$syntable, syn2 = differential$syntable,
                    matrix = schedenveg, cluster = pam1$clustering,
                    method = "alldiff", min1 = 25)
complete            # view result table
differential$differentials  # list differential species for clusters


[Package goeveg version 0.7.5 Index]