Re: [R] counting the duplicates in an object of list

2011-09-07 Thread zhenjiang xu
bco.com > > *From:* zhenjiang xu [mailto:zhenjiang...@gmail.com] > *Sent:* Wednesday, September 07, 2011 8:04 PM > > *To:* William Dunlap > *Cc:* r-help > *Subject:* Re: [R] counting the duplicates in an object of list > > ** ** > > I tried converting th

Re: [R] counting the duplicates in an object of list

2011-09-07 Thread William Dunlap
ill Dunlap Spotfire, TIBCO Software wdunlap tibco.com From: zhenjiang xu [mailto:zhenjiang...@gmail.com] Sent: Wednesday, September 07, 2011 8:04 PM To: William Dunlap Cc: r-help Subject: Re: [R] counting the duplicates in an object of list I tried converting the elements to strings before, but due to

Re: [R] counting the duplicates in an object of list

2011-09-07 Thread zhenjiang xu
gt; wdunlap tibco.com > > *From:* zhenjiang xu [mailto:zhenjiang...@gmail.com] > *Sent:* Wednesday, September 07, 2011 7:25 PM > *To:* William Dunlap > *Cc:* r-help > *Subject:* Re: [R] counting the duplicates in an object of list > > ** ** > > Now I naile

Re: [R] counting the duplicates in an object of list

2011-09-07 Thread William Dunlap
2011 7:25 PM To: William Dunlap Cc: r-help Subject: Re: [R] counting the duplicates in an object of list Now I nailed down the problem, but I am still confused why match() takes the 1st two components and the last two the same. > match(a,a) [1] 1 2 3 1 2 > a [[1]] [1] "YARCTy1-1" &q

Re: [R] counting the duplicates in an object of list

2011-09-07 Thread zhenjiang xu
quot;YDR316W-B" "YDRWTy1-5" "YDR365W-B" "YERCTy1-1" "YER138C" [19] "YERCTy1-2" "YER160C" "YGRWTy1-1" "YGR027W-B" "YGRCTy1-2" "YGR038C-B" [25] "YGRCTy1-3" "YGR161C-D" "Y

Re: [R] counting the duplicates in an object of list

2011-09-07 Thread zhenjiang xu
t the best depends on what you want to do with the > data. > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > > -----Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of zhenjiang xu > > S

Re: [R] counting the duplicates in an object of list

2011-08-31 Thread William Dunlap
al Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of zhenjiang xu > Sent: Wednesday, August 31, 2011 9:25 AM > To: r-help > Subject: [R] counting the duplicates in an object of list > > Hi all, > > I have a list x

[R] counting the duplicates in an object of list

2011-08-31 Thread zhenjiang xu
Hi all, I have a list x:  > x=list(a=c('1','2'),b=c('2','3'),c=c('1','2'),d=c('2','3')) I can get the unique elements with unique(), but how can I get the number of duplicates for each unique elements? > unique(x) [[1]] [1] "1" "2" [[2]] [1] "2" "3" Thanks -- Best, Zhenjiang ___