From: Carlos Ortega (carlos.ortega@minorplanet.com)
Date: Fri 25 Jan 2002 - 05:24:38 EST
Message-id: <02da01c1a504$628489f0$176ea8c0@MinorplanetDev>
Hello,
Although your message is not very explicit about the structure of your data
frame,
I think you can get what you want by using a combination of the function
"split" and
the "apply" functions family: apply, lapply and sapply.
If you provide a more detailed organization of your data frame, perhaps we
can give
to you a more wiser advice.
Thanks,
Carlos.
P.S: By the way, please include in the "Subject" a more descriptive message.
-----Mensaje original-----
De: owner-r-help@stat.math.ethz.ch
[mailto:owner-r-help@stat.math.ethz.ch]En nombre de Erin Hodgess
Enviado el: miércoles, 23 de enero de 2002 22:39
Para: r-help@stat.math.ethz.ch
Asunto:
Dear R People:
Here is a very simple question, please:
I have a data frame with the state name, state division, and population.
Note: state division is something like Atlantic, Mountain, etc.
I want to produce a table with the state division and the total of the
populations for the states within that division.
I've been messing with "table" but so far, no luck.
This is R1.3.1, on Windows 98.
thanks in advance!
Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
1 Main Street
Houston, TX 77002
mailto: hodgess@uhddx01.dt.uh.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2.1.3 : Wed 16 Oct 2002 - 11:56:55 EST