Learn R Programming

mefa (version 1.1-4)

binmat: Make Presence/Absence Matrix

Description

This is a utility function to convert a matrix with abundance (or measurement) data into a binary (presence/absence) format.

Usage

binmat(matrix)

Arguments

matrix
a matrix, containing data to convert.

Value

  • A result is a matrix with same dimensions and row/column names as the original.

Examples

Run this code
(x <- matrix(data = rpois(15, 1), nrow = 5, ncol = 3))
binmat(x)

Run the code above in your browser using DataLab