[R-sig-eco] Converting species counts into species list
Stefano Leonardi
stefano.leonardi at unipr.it
Mon Dec 6 09:32:33 CET 2010
On 06/12/2010 09:08, Ophelia Wang wrote:
> Hello,
>
> I have a list of species and abundance that looks like this:
>
> Aegiinte 3
> Agonperu 3
> Aiouimpr 2
> Albiniop 2
> Albisubd 1
> ..................
Say you have a vector of species names called Species and another vector
with the abundances called Abundance
then
rep(as.character(Species), Abundances)
will do what you want.
Cheers
Stefano
--
======================================================================
Stefano Leonardi
More information about the R-sig-ecology
mailing list