Hello all,
I have a large dataset in excel that I need to sort and rank by abundance. It includes information on the abundances of each of 154 different plant species at each of eight locations, during six different sampling periods (3 years, fall and spring) with twenty replicates per site (plot number). There are separate site, season, year, and plot columns to identify individual records, as well as one column for each species.
I need to create rank-abundance profiles for each replicate site during each sampling period. For further clarification on what these are, do a google search for "species rank abundance plot". There is an image that comes up and many web pages that explain the concept. To do this, I need to sort the species data in each row by rank-within-row from most abundant to least abundant from left to right. There will be a lot of zeros on the right since most plots only have 5 - 20 of the 154 species in them. The abundance values don't need to be linked with the species name headers anymore. I hope that part was clear.
Then I want to calculate the proportion of of the row total abundance that each species contributes. Then (it goes on), I want to calculate mean rank-abundance profiles for each site by sampling date combinations by averaging across the 20 replicate plots. I want to do this part twice - once with the proportion data, and once with the raw data. Here's how the data is organized. There are 960 rows:
Site Season Year Plot# Species1 Sp2 Sp3 Sp4.... Sp154
A Spring 2003 1 0 5 2 15
A Spring 2003 2 5 0 1 3
.
.
A Spring 2003 20 8 5 9 10
B Spring 2003 1 0 5 2 15
B Spring 2003 2 0 5 2 15
.
.
B Spring 2003 20 3 2 22 15
I want to sort it like this:
Site Season Year Plot# Species1 Sp2 Sp3 Sp4....
A Spring 2003 1 15 5 2
A Spring 2003 1 5 3 2
.
.
A Spring 2003 20 10 9 8 5
B Spring 2003 1 15 5 2
B Spring 2003 2 15 5 2
.
.
B Spring 2003 20 22 15 3 2
etc...
and then calculate proportions for each record (row) and average for each site by season. The species column headers no longer reffer to the actual species names (like red maple and such). They are the rank numbers of the sorted data.
Example of mean profile:
Site Season Year Sp1 Sp2 Sp3 Sp4
A Spring 2003 10 5.6 4 1.6
B Spring 2003 .....
How can I get excel to sort my data rows independently of each other simultaneousely (or in sequence)? The sort function always links the data together, either by rows or columns depending on which way you sort. Is it easy to then calculate the proportion information and means automatically? That could happen on a separate worksheet. Many thanks in advance for your advice!
Cheers,
Jeff
Bookmarks