Skip to contents

Sampling subset of data.

Usage

samplingSubsetData(d = NULL, sampUnit = NULL, nperm = 9, 
  type = "proportion", prop = seq(10, 100, by = 10), MinSample = 1,
  Size = NULL)

Arguments

d

Dataframe of data to sample. Each line is an individual.

sampUnit

A Factor defining the sampling unit to impoverish. For example it can be the species or the plot attributes of each individual.

nperm

Number of permutations.

type

Type of sampling. Either proportion, count, propBySize or factorBySize. See details.

prop

Integer between 1 and 100. Categorical proportions to sample in percentage.

MinSample

Minimum number of individual to sample by sample unit. Default is one.

Size

A vector of value for each individual (type propBySize and factorBySize) or for each level of factor (factorBySize only). Determine the rank of individual/factor when using the sampling schemes propBySize and factorBySize.

Details

Sampling scheme count sample a number of individuals wheras proportion sample a proportion of individuals by sample unit. Sampling scheme propBySize sample in each sampling unit (sampUnit) a proportion of the individual ranked using the argument Size. Consequently, the bigest individuals (higher Size) will be sample before the smaller one. factorBySize sample a proportion of sampling unit (sampUnit) ranked using the argument Size. For example you can sample only the individuals of the 20% of the more aboundant species.

Value

Return a list list of sample dataframe. The first level of the list depicts the permutation and the second level depicts the different proportion/number of individual sampled by factor.

Author

Adrien Taudiere