Shouldn't the analysis account for the different lengths of time? Why standardize and (I assume) effectively ignore the differences in lengths of time? Is there an "offset" feature in the proposed analysis as in lm and glmer that could be used?
Jim -----Original Message----- From: r-sig-ecology-boun...@r-project.org [mailto:r-sig-ecology-boun...@r-project.org] On Behalf Of Bruce Miller Sent: Saturday, April 20, 2013 3:43 AM To: r-sig-ecology@r-project.org Subject: [R-sig-eco] Reshape or Plyr? H all, I have relative abundance data from >100 sites. This is from acoustic monitoring and usually the data is for 2-3 nights but in some cases my be longer like months for each location.. The data output from my management data base is proved by species by night for each location so data frame would look like this below. What I need to do is sum the Survey_time by Spec_Code for each location name and divide summed AI values for each Spec_code by the summed Survey time to adjust for unit effort then standardize it all by *10 to represent the relative abundance by survey hour to 10 hours. How best to do this? Using Plyr or reshape? Location name SPEC_CODE Start_Day Survey_Time AI Std AI 079-f2p1-Acetuna Buzz 2/14/2012 12.1 1 0.8264463 079-f2p1-Acetuna Buzz 2/14/2012 12.1 1 0.8264463 079-f2p1-Acetuna Eumspp 2/14/2012 12.1 1 0.8264463 079-f2p1-Acetuna Frag 2/14/2012 12.1 18 14.87603 079-f2p1-Acetuna Molspp 2/14/2012 12.1 5 4.132231 079-f2p1-Acetuna Molspp 2/14/2012 12.1 5 4.132231 079-f2p1-Acetuna Phyllo 2/14/2012 12.1 2 1.652893 079-f2p1-Acetuna Ptedav 2/14/2012 12.1 1 0.8264463 079-f2p1-Acetuna Ptegym 2/14/2012 12.1 1 0.8264463 079-f2p1-Acetuna Ptepar 2/14/2012 12.1 2 1.652893 079-f2p1-Acetuna Rhotum 2/14/2012 12.1 6 4.958678 079-f2p1-Acetuna Sacbil 2/14/2012 12.1 6 4.958678 079-f2p1-Acetuna Saclep 2/14/2012 12.1 11 9.090909 079-f2p1-Acetuna Buzz 2/15/2012 12.1 2 1.652893 079-f2p1-Acetuna Buzz 2/15/2012 12.1 2 1.652893 079-f2p1-Acetuna Molmol 2/15/2012 12.1 1 0.8264463 079-f2p1-Acetuna Molspp 2/15/2012 12.1 7 5.785124 079-f2p1-Acetuna Molspp 2/15/2012 12.1 7 5.785124 079-f2p1-Acetuna Nocalb 2/15/2012 12.1 6 4.958678 079-f2p1-Acetuna Phyllo 2/15/2012 12.1 1 0.8264463 079-f2p1-Acetuna Ptedav 2/15/2012 12.1 1 0.8264463 079-f2p1-Acetuna Ptegym 2/15/2012 12.1 4 3.305785 079-f2p1-Acetuna Ptepar 2/15/2012 12.1 4 3.305785 079-f2p1-Acetuna Pteper 2/15/2012 12.1 3 2.479339 079-f2p1-Acetuna Rhotum 2/15/2012 12.1 7 5.785124 079-f2p1-Acetuna Sacbil 2/15/2012 12.1 2 1.652893 079-f2p1-Acetuna Saclep 2/15/2012 12.1 6 4.958678 079-f2p1-Acetuna Buzz 2/16/2012 12.2 1 0.8196721 079-f2p1-Acetuna Buzz 2/16/2012 12.2 1 0.8196721 079-f2p1-Acetuna Eumspp 2/16/2012 12.2 4 3.278688 079-f2p1-Acetuna Molspp 2/16/2012 12.2 2 1.639344 079-f2p1-Acetuna Molspp 2/16/2012 12.2 2 1.639344 079-f2p1-Acetuna Myokea 2/16/2012 12.2 1 0.8196721 079-f2p1-Acetuna Nocalb 2/16/2012 12.2 4 3.278688 079-f2p1-Acetuna Phyllo 2/16/2012 12.2 1 0.8196721 079-f2p1-Acetuna Ptedav 2/16/2012 12.2 1 0.8196721 079-f2p1-Acetuna Ptegym 2/16/2012 12.2 1 0.8196721 079-f2p1-Acetuna Ptepar 2/16/2012 12.2 3 2.459016 079-f2p1-Acetuna Pteper 2/16/2012 12.2 1 0.8196721 079-f2p1-Acetuna Rhotum 2/16/2012 12.2 17 13.93443 079-f2p1-Acetuna Sacbil 2/16/2012 12.2 3 2.459016 079-f2p1-Acetuna Saclep 2/16/2012 12.2 15 12.29508 Thanks for any suggestions. Excel will be a mess to try to do that. Bruce [[alternative HTML version deleted]] _______________________________________________ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. _______________________________________________ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology