Learn R Programming

Nematode (version 0.2.0)

runSimper: Similarity Percentages Analysis

Description

Discriminating species between two groups using Bray-Curtis dissimilarities

Usage

runSimper(object, ...)

# S3 method for Ordination runSimper(object, ...)

# S3 method for default runSimper(object, ...)

Value

The object of class "Ordination" containing (See runNMDS for details):

  • data - List containing the input data and group information

  • call - The function call

  • NMDS - NMDS results from metaMDS

  • SIMPER - SIMPER results

Arguments

object

An object of class "Ordination".

...

Additional arguments passed to simper.

Examples

Run this code
# Example with default Bray-Curtis distance
data <- data.frame(
  Cephalobus = c(10, 20, 30, 1, 6, 5),
  Eucephalobus = c(5, 10, 12, 30, 1, 6),
  Acrobeloides = c(1, 2, 3, 12, 30, 1),
  Caenorhabditis = c(5, 8, 15, 2, 3, 12),
  Aphelenchus = c(5, 13, 11, 15, 2, 3),
  Leptonchus = c(3, 10, 15, 0, 15, 11),
  Pratylenchus = c(9, 2, 15, 15, 0, 15),
  Tylenchus = c(5, 0, 15, 11, 15, 2),
  Mesodorylaimus = c(7, 10, 18, 3, 12, 30),
  Discolaimus = c(1, 10, 25, 10, 18, 3),
  row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6")
)
group_df <- data.frame(
  group = c("A", "A", "B", "B", "C", "C"),
  row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6")
)
nmds <- runNMDS(data, group = group_df, simper = FALSE)

# Example
nmds_simper <- runSimper(nmds)
print(nmds_simper$SIMPER)

Run the code above in your browser using DataLab