[R] Randomising matrices

Nick Cutler s0455078 at sms.ed.ac.uk
Fri Apr 27 10:45:38 CEST 2007

I would like to be able to randomise presence-absence (i.e. binary) 
matrices whilst keeping both the row and column totals constant. Is 
there a function in R that would allow me to do this?

I'm working with vegetation presence-absence matrices based on field 
observations. The matrices are formatted to have sites as rows and 
species as columns. The presence of a species on a site is indicated 
with a 1 (absence is obviously indicated with a 0).

I would like to randomise the matrices many times in order to construct 
null models. However, I cannot identify a function in R to do this, and 
the programming looks tricky for someone of my limited skills.

Can anybody help me out?

Many thanks,

Nick Cutler

Institute of Geography
School of Geosciences
University of Edinburgh
Drummond Street
Edinburgh EH8 9XP
United Kingdom

Tel: 0131 650 2532
Web: http://www.geos.ed.ac.uk/homes/s0455078

More information about the R-help mailing list