ec_generate_pa: Generate random presence/absence matrix

View source: R/ec_generate.R

ec_generate_paR Documentation

Generate random presence/absence matrix

Description

Generate random presence/absence matrix

Usage

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

  • ec_order_pa(): Returns

Examples

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

KevCaz/ecoocc documentation built on May 24, 2023, 1:43 p.m.