[R] table, sum, cat function
Richard.Cotton at hsl.gov.uk
Richard.Cotton at hsl.gov.uk
Tue Aug 25 13:08:44 CEST 2009
the second step in my exercice is to calculate the sum of the amout for each
class et not the frequency
i have this vector
x y
1 100
2 1500
3 3250
4 6250
5 2000
6 450
i want to use the function table and cat to calculate the sum of the amount
in each class [0-1000], [1000-3000],[> 3000]
You want to use cut, not cat. Take a look at the examples on the cut help
page - they will help you.
Regards,
Richie.
Mathematical Sciences Unit
[1]HSL
_________________________________________________________________
ATTENTION:
This message contains privileged and confidential information intended for
the addressee(s) only. If this message was sent to you in error, you must
not disseminate, copy or take any action in reliance on it and we request
that you notify the sender immediately by return email.
Opinions expressed in this message and any attachments are not necessarily
those held by the [2]Health and Safety Laboratory or any person connected
with the organisation, save those by whom the opinions were expressed.
Please note that any messages sent or received by the [3]Health and Safety
Laboratory email system may be monitored and stored in an information
retrieval system.
_________________________________________________________________
Think before you print - do you really need to print this email?
_________________________________________________________________
_________________________________________________________________
Scanned by MailMarshal - Marshal's comprehensive email content security
solution. Download a free evaluation of MailMarshal at [4]www.marshal.com
_________________________________________________________________
References
1. http://www.hsl.gov.uk/contact-us.htm
2. http://www.hsl.gov.uk/
3. http://www.hsl.gov.uk/
4. http://www.marshal.com/
More information about the R-help
mailing list