s-news
[Top] [All Lists]

Re: counting occurrences

To: <Ita.Cirovic-Donev@hypo-alpe-adria.com>
Subject: Re: counting occurrences
From: "Dimitris Rizopoulos" <dimitris.rizopoulos@med.kuleuven.be>
Date: Mon, 20 Nov 2006 15:08:32 +0100
Cc: <s-news@lists.biostat.wustl.edu>
References: <OF71C1CDF3.63A8D23D-ONC125722C.004C822A-C125722C.004CECFA@arz.co.at>
look at ?table, e.g.,

x <- sample(LETTERS, 1100, TRUE)
table(x)

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
    http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- From: <Ita.Cirovic-Donev@hypo-alpe-adria.com>
To: <s-news@lists.biostat.wustl.edu>
Sent: Monday, November 20, 2006 3:00 PM
Subject: [S] counting occurrences






Hi,

I have a vector with qualitative values such as A,B,C,D,E,F,G. The length of the column is 1100. I would like to go through the vector an count the occurrences of A, B,C and so on and record the values in the new vector. Is there a function that does a counting in this way that I can insert into
the for loop. Thanks.


Razmjena informacija s HYPO ALPE-ADRIA-BANK d.d. putem e-maila je bez jamstava. Zakljucivanje pravnih poslova putem ovog medija nije dozvoljeno. Ovaj e-mail moze sadrzavati povjerljive i/ili povlastene informacije. Ako ste ga primili greskom, molimo Vas da nas o tome odmah obavijestite tako sto cete na njega odgovoriti, a zatim vas molimo da ga izbrisete iz vaseg
sustava. Ovime vas obavjestavamo da je svako otkrivanje, kopiranje,
distribuiranje ili poduzimanje bilo kakvih aktivnosti u vezi s njegovim
sadrzajem strogo zabranjeno i moze biti nezakonito.



The exchange of messages with HYPO ALPE-ADRIA-BANK d.d. via e-mail is not binding. Declarations regarding legal transactions must not be exchanged
via this medium. The information contained in this e-mail message is
confidential and intended exclusively for the addressee. Persons receiving this e-mail message who are not the named addressee (or his/her co-workers, or persons authorized to take delivery) must not use, forward or reproduce its contents. If you have received this e-mail message by mistake, please contact us immediately and delete this email message beyond retrieval.

--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


<Prev in Thread] Current Thread [Next in Thread>