dbTab2mat: Transform a checklist of species into a matrix of presences...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/dbTab2mat.R

Description

The function

Usage

1
dbTab2mat(dbTab, col_samplingUnits = "SU", col_species = "sp", col_content = "abundance", empty = NA)

Arguments

dbTab

data.frame containing the data

col_samplingUnits

name of the column of dbTab which contains the locations, sites or sampling units

col_species

name of the column of dbTab which contains the species names

col_content

name of the column of dbTab which contains the presence, abundance or any content that we want to fill the matrix

empty

Value used to fill the matrix when the couple Sampling unit / species is not given in dbTab (absences of the species). If NA, the value is deduced from the mode of the col_content column

Value

A table sampling units/species with presences or abundances of the species

Author(s)

Bottin, Marius

See Also

mat2dbTab

Examples

1
2
(dbTab<-data.frame(SU=rep(paste("site",1:10,sep=""),10),sp=rep(paste("sp",1:10,sep=""),each=10),abundance=sample(1:5,100,prob=c(10,7,3,2,1),replace=T))[sample(1:100,30),])
dbTab2mat(dbTab)

marbotte/marbotte_util documentation built on May 21, 2019, 9:35 a.m.