ec_generate_pa: Generate random presence/absence matrix

Description Usage Arguments Functions Examples

View source: R/ec_generate.R

Description

Generate random presence/absence matrix

Usage

1
2
3
ec_generate_pa(nsit, nspc, probs, ...)

ec_order_pa(x, by = c("both", "site", "species"), decreasing = TRUE)

Arguments

nsit

number of site (determine the number of rows).

nspc

number of species (determine the number of columns).

probs

numeric vector of probabilities presence of species. If there are less elements than species, then the vector is recycled and if there are more, the vector is truncated (see rep_len())

...

further arguments passed on to ec_pa().

x

a pa object or an R object to a coerced to one (see ec_as_pa()).

by

dimension along which the pa object should be ordered, default is set to "both".

decreasing

Should the sort order be increasing or decreasing? see order().

Functions

Examples

1
2
ec_generate_pa(20, 10, .1)
ec_order_pa(ec_generate_pa(20, 10, .1))

KevCaz/ecoocc documentation built on Aug. 7, 2021, 8:22 p.m.