freq_comb: Frequency of species combinations

View source: R/freq_comb.R

freq_combR Documentation

Frequency of species combinations

Description

The 'freq_comb()' function extracts the combinational frequency of species. 'freq_comb()' is minor and features in the vignette to assist users visualize their data.

Usage

freq_comb(data, type, dim_max)

Arguments

data

data.frame with the frequency of species combinations.

type

Character. Supply either '"Grid"' or '"Transect"'.

dim_max

Numeric. Number of sampling units in one row of a '"Grid"' or '"Transect"'.

Value

The function returns an object of class data.frame.

Author(s)

James L. Tsakalos

See Also

['comspat()']

Examples


# Training data (see package vignette S.9)
s9 <- data.frame(
  Species = c("A", "D", "B", "B", "E", "C", "B", "A"),
  Y = c(1, 1, 2, 2, 2, 3, 3, 3),
  X = c(2, 3, 1, 2, 2, 1, 1, 3)
)

# create data.frame counting the species combinations
freq_comb(
  data = s9,
  type = "Grid",
  dim_max = 3
)


jamestsakalos/ComSpat documentation built on July 1, 2023, 3:52 p.m.