matrix_contrasts: Matrix of contrast weights

Description Usage Arguments Value Author(s)

View source: R/matrix_contrasts.R

Description

This function assembles multiple vectors of contrasts weights into a matrix. All pairwise contrasts between habitats on each island are computed separately. Contrasts between habitats across islands are not considered.

Usage

1
matrix_contrasts(specdata)

Arguments

specdata

A data frame containing at least columns for the dependent variables, as well as a column "island" and a column "habitat".

Value

A matrix of contrast weights. Each row is a contrast. Each column is a habitat on a given island. Each row is filled with zeros, except the two habitats to compare, which are given values 1 and -1.

Author(s)

Raphael Scherrer


rscherrer/sagreicolor documentation built on Dec. 26, 2018, 1:15 p.m.