-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
project.org] On Behalf Of mariasve
Sent: Wednesday, May 09, 2012 9:35 AM
To: r-help at r-project.org
Subject: [R] Random resampling of columns in species association
matrices
I have a host-parasite association matrix in which parasite species are
rows
and host species columns and cells contain the frequency of
interactions.
Some parasites are associated with many hosts, and some hosts harbor
several
parasites, and I want to repeatedly select only one single
representative
host per "generalized" (multi-host) parasite to create a new matrix in
which
no hosts are repeated. That is, I want multiple randomly generated
symmetric
matrices in which a host and a parasite species appear only once.
Furthermore, I want to weight the probability of selecting a particular
host
for a parasite by the frequency of interactions between the two.
Finally, a
handful of parasites associate with only one single host. I do not want
to
lose these from the matrix, but rather fix these associations and only
randomly select hosts for the generalized parasite species.
My goal is to eventually perform generalized least squares regressions
between a parasite trait and several host traits, but the first major
hurdle
for me to get over is how to randomly select only one host per parasite
with
no repetition of species in the matrix. I am also generally interested
in
how to resample columns instead of rows (in the package boot, for
instance)
because of another analysis I'm working on, and I have been unable to
find a
solution to this when searching the R help site.
Any suggestions would be most welcomed.
Maria
--
View this message in context: http://r.789695.n4.nabble.com/Random-
resampling-of-columns-in-species-association-matrices-tp4620618.html
Sent from the R help mailing list archive at Nabble.com.