Re: [R] count combined occurrences of categories

2013-01-13 Thread Biau David
-project.org; Biau David djmb...@yahoo.fr Envoyé le : Vendredi 11 janvier 2013 18h54 Objet : Re: [R] count combined occurrences of categories On Jan 11, 2013, at 9:47 AM, arun wrote: HI David, I get different results with dcast() library(reshape2)   dcast(melt(tutu,nam),nam~value,length

[R] count combined occurrences of categories

2013-01-11 Thread Biau David
Dear all,   i would like to count the number of times where I have combined occurrences of the categories of 2 variables.   For instance, in the dataframe below, i would like to know how many times each author (au1, au2, au3 represent the first, second, third author) is associated with each of

Re: [R] count combined occurrences of categories

2013-01-11 Thread PIKAL Petr
Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Biau David Sent: Friday, January 11, 2013 11:55 AM To: r help list Subject: [R] count combined occurrences of categories Dear all, i would like to count the number

Re: [R] count combined occurrences of categories

2013-01-11 Thread Pascal Oettli
Hello, Maybe you can try something like that: count.au1 - tapply(tutu$au1, tutu$nam, table) count.au2 - tapply(tutu$au2, tutu$nam, table) count.au3 - tapply(tutu$au3, tutu$nam, table) HTH, Pascal Le 11/01/2013 19:54, Biau David a écrit : Dear all, i would like to count the number of times

Re: [R] count combined occurrences of categories

2013-01-11 Thread David Winsemius
On Jan 11, 2013, at 2:54 AM, Biau David wrote: Dear all, i would like to count the number of times where I have combined occurrences of the categories of 2 variables. For instance, in the dataframe below, i would like to know how many times each author (au1, au2, au3 represent the

Re: [R] count combined occurrences of categories

2013-01-11 Thread David Winsemius
Subject: Re: [R] count combined occurrences of categories On Jan 11, 2013, at 2:54 AM, Biau David wrote: Dear all, i would like to count the number of times where I have combined occurrences of the categories of 2 variables. For instance, in the dataframe below, i would like to know how many

Re: [R] count combined occurrences of categories

2013-01-11 Thread arun
...@yahoo.fr To: r help list r-help@r-project.org Cc: Sent: Friday, January 11, 2013 5:54 AM Subject: [R] count combined occurrences of categories Dear all,   i would like to count the number of times where I have combined occurrences of the categories of 2 variables.   For instance

Re: [R] count combined occurrences of categories

2013-01-11 Thread arun
: David Winsemius dwinsem...@comcast.net To: Biau David djmb...@yahoo.fr Cc: r help list r-help@r-project.org Sent: Friday, January 11, 2013 12:20 PM Subject: Re: [R] count combined occurrences of categories On Jan 11, 2013, at 2:54 AM, Biau David wrote: Dear all, i would like to count