[R] getting a new factor

Ricardo Rodríguez webmaster at xen.net
Sun Dec 31 00:25:27 CET 2006


Hi all,

Given a data frame as...

> head(veg)
     genus      species trophia type geo zone importance
1 Sphagnum  subsecundum       M        A   En        100
2 Sphagnum denticulatum       M        A   En        200
3  Molinia     caerulea       M        A   En        300
4 Sphagnum    flexuosum       M        A   En        400
5   Juncus   squarrosus       M        A   En        500
6    Carex     echinata       M        A   En        600

I do need a new one with a new factor constructed from a concatenation of the two first columns, genus and species. I am guessing this must be a simple matter while working with R, but I am stuck at this point.

Any help will be welcome! Thanks.

---
Ricardo Rodríguez
Your XEN ICT Team



More information about the R-help mailing list