Skip to content | Change text size
WSC home Commercial analytical services About the WSC Strategic research Contract research Knowledge exchange Postgraduate students WSC publications Staff section Links Contact us
 

Fixed number subsampler

ssN {sub.sample}

Usage

ssN(x, N, spp.names = NULL)

Arguments

x

a data frame or a matrix with samples in columns and taxa in rows

N

Number of individuals to be in subsamples

spp.names

if x is a data frame, it is assumed that the row names will be species names. Otherwise they can be supplied separately as a vector of the same length as the number of rows in x. If x is not a data frame and spp.names = NULL, they will be reported as numbers.

Details

This function randomly selects N individuals from each sample and returns a matrix of subsampled species counts in the same format as x. If N is less than the total number of individuals in a sample, the full sample is returned

Value

ss.x

a data frame of the same structure of x, but with subsampled counts

Author(s)

Chris Walsh: Chris.Walsh@sci.monash.edu.au.

References

Marchant, R. (1989) A subsampler for samples of benthic invertebrates. Bulletin of the Australian Society for Limnology 12, 49-52.

Examples

#subsamples of 100 individuals from a set of invertebrate
#samples
urban <- read.table("urban.txt", header=TRUE)
urban.100 <- ssN(urban[,2:24],100,spp.names = urban[,1])
urban.100