mama: A (convenience) wrapper function to make matrix from a...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The function mama uses reshape to transpose species data given in database list format (where each line represents a species in a plot, so the list has three columns containing information on plot, species and information on occurence) into a plot species matrix (where rows represent plots and columns represent species) for further use with other functions on vegetational data.

Usage

1
mama(dat, spl = TRUE)

Arguments

dat

Species data in list format. The columns have to represent plot, species, occurence information (presence/absence or abundances). Column names may differ but they must be in that order! The last column can be missing when these are presence/absence data

spl

Logical. If TRUE (default) mama assumes that the input is species data and formats the output accordingly

Details

You could reach the same result with reshape. I was just always quite confused with this. That's why i decided to do this little wrapper for convenience. It needs quite a while to run though, but this is due to reshape.

Value

Returns a data.frame which contains the presence/absence or abundance data of the species list. Rows represent plots, columns represent species. If you want to have it vice versa you have to use the function on a list with columns species, plots, occurrence information (in that order).

Author(s)

Gerald Jurasinski

See Also

reshape, data.frame

Examples

1
2
3
4
5
6
    
data(abis)
abis.spcls <- liste(abis.spec, splist=TRUE)
## see the list, it like what you get from a database
## and return to matrix-format:
abis.test <- mama(abis.spcls)

simba documentation built on May 1, 2019, 8:49 p.m.