dominance_matrix: Create a dominance_matrix object to use in a trophic...

Description Usage Arguments Value Note Examples

Description

A 'dominance matrix' object stores the relative dominance of a species over other species sharing the same resource. It is a sub-component of a trophic_dynamics object

Usage

1
2
3
4
5
6
build_dominance_matrix(dominance = NULL, nsp = NULL, ...)

is.dominance_matrix(x)

## S3 method for class 'dominance_matrix'
print(x, ...)

Arguments

dominance

a matrix (or NULL object) identifying the relative dominance of a species over other species feeding off the same resource

nsp

the number of species; required if dominance is NULL (in which case a flat dominance matrix is returned)

...

further arguments passed to or from other methods

x

an object to print or test as a dominance_matrix object

Value

An object of class dominance_matrix

Note

Passing dominance = NULL will create a flat dominance matrix with all species assigned equal dominance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(trophic)

# Construct the dominance_matrix object

test_dominance <- build_dominance_matrix(dominance = dominance_matrix)

# Test if object is of the type 'dominance_matrix'
  
## Not run: 
is.dominance_matrix(x)

## End(Not run)

# Print information about the 'dominance_matrix' object

## Not run: 
print(x)

## End(Not run)

jdyen/trophic documentation built on May 15, 2019, 3:19 p.m.