Re: [R] a problem with table() and duplicates

2014-01-22 Thread Simone Gabbriellini
that is awesome, thank you Jim! 2014/1/22 jim holtman : > try: > > table(dataframe$religion[!duplicated(dataframe$name)]) > > > Jim Holtman > Data Munger Guru > > What is the problem that you are trying to solve? > Tell me what you want to do, not how you want to do it. > > > On Wed, Jan 22, 2014

Re: [R] a problem with table() and duplicates

2014-01-22 Thread jim holtman
try: table(dataframe$religion[!duplicated(dataframe$name)]) Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Wed, Jan 22, 2014 at 11:04 AM, Simone Gabbriellini wrote: > Dear List, > > I have a data.frame

[R] a problem with table() and duplicates

2014-01-22 Thread Simone Gabbriellini
Dear List, I have a data.frame like this: name religion neighbor religion.neighbor pippo a minnie a pluto a mickey a paperino b donald a paperino b minnie b when I table(dataframe$religion) my data.frame, I get a b 2 2 of course, "paperino" is cited twice but should be counted once. Is there an