3 Jan 2011 15:52
Re: working with groups in a data frame
David L Lorenz <lorenz <at> usgs.gov>
2011-01-03 14:52:58 GMT
2011-01-03 14:52:58 GMT
Winnie,
I've used the by() function and the output by object to manage and analyze data like this.
I do not know if you know that you need to do exactly the same thing on each group--in which case I'd suggest doing that with by, or if the analysis might change from case to case, in which case I'd organize the data using by() and then process each group based on its own particular characteristics.
Dave
| From: | Crawford.Winnie <crawford.winnie <at> ensco.com> |
| To: | S-PLUS Newsgroup <s-news <at> lists.biostat.wustl.edu> |
| Date: | 12/30/2010 02:24 PM |
| Subject: | [S] working with groups in a data frame |
| Sent by: | s-news-owner <at> lists.biostat.wustl.edu |
I’m using S-PLUS 8.0 for Windows in the Windows 7 operating system.
I have a data frame with 44,640 records. I need to operate on these data in groups of 6 (7,440 groups). Each 6-record group is defined by Year, Day, Hour, and Min, although that may not be important. I just need to work with the data in certain columns in groups of 6 beginning with the first record. If anyone can tell me a good function or two to check out, I’d appreciate it.
Happy New Year to all.
*****************************************************************
Winifred C. Crawford Staff Scientist/Senior Meteorologist
ENSCO, Inc.
Aerospace Sciences and Engineering Division
1980 N. Atlantic Ave., Suite 830
Cocoa Beach, FL 32931
VOICE: 321.853.8130 FAX: 321.853.8415
EMAIL: crawford.winnie <at> ensco.com
AMU Quarterly Reports are available online:
http://science.ksc.nasa.gov/amu
****************************************************************
The U.S. Export Control Laws regulate the export and re-export of technology originating in the United States. This includes the electronic transmission of information and software to foreign countries and to certain foreign nationals. Recipient agrees to abide by these laws and their regulations -- including the U.S. Department of Commerce Export Administration Regulations and the U.S. Department of State International Traffic in Arms Regulations -- and not to transfer, by electronic transmission or otherwise, any content derived from this email to either a foreign national or a foreign destination in violation of such laws.
RSS Feed