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

The function makes cross tabulation of an object of class 'stcs'. Similar to the `table`

function but handles specialities of the 'stcs' object class (i.e. removes 'pseudo species' created to indicate empty samples). This is used internally by the function `mefa`

to make 3 dimensional representation of the data.

1 | ```
mefaCrosstab(x, segment = FALSE, nested = FALSE, drop.zero = FALSE)
``` |

`x` |
an object of class 'stcs'. |

`segment` |
logical, if |

`nested` |
logical, if |

`drop.zero` |
argument passed to the function |

The cross tabulation of an object of class 'stcs' is made by the function `xtabs`

, whic accepts non-integer values too.

It returs a matrix if `segment = FALSE`

or a list with matrices for the segments if `segment = TRUE`

.

P\'eter S\'olymos, solymos@ualberta.ca

S\'olymos P. (2008) mefa: an R package for handling and reporting count data. *Community Ecology* **9**, 125–127.

S\'olymos P. (2009) Processing ecological data in R with the mefa package. *Journal of Statistical Software* **29(8)**, 1–28. doi: 10.18637/jss.v029.i08

http://mefa.r-forge.r-project.org/

1 2 3 4 5 6 7 8 9 10 11 | ```
x <- data.frame(sample = LETTERS[c(1,1,2,2,3,4)],
species = c(letters[c(5,5,5,6,7)], "zero.pseudo"),
count = c(1,2,10,3,4,0), segment = letters[c(8,9,8,9,8,8)])
y <- stcs(x)
mefaCrosstab(y)
mefaCrosstab(y, segment = TRUE)
mefaCrosstab(y, segment = TRUE, nested = TRUE)
## Examples for non-integer data
y[1:5, 3] <- y[1:5, 3] + 0.123
mefaCrosstab(y)
mefaCrosstab(y, segment = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.