Re: [R] Extracting only multiple occurrences

2013-08-08 Thread Kevin Parent
A lot of helpful solutions that pretty much all work. Thanks, everyone!   _ Kevin Parent, Ph.D Korea Maritime University From: Rolf Turner To: Jim Lemon ject.org> Sent: Thursday, August 8, 2013 6:26 PM Subject: Re: [R] Extracting only multi

Re: [R] Extracting only multiple occurrences

2013-08-08 Thread Rolf Turner
On 08/08/13 20:27, Jim Lemon wrote: On 08/08/2013 04:23 PM, Kevin Parent wrote: Well that almost works, and I didn't know about duplicated() so thanks for that. However, it only gives me the duplicated values. I need the original ones too. So the result I want is: [g,g,m,m,s,s,t,t,u,u,u,v,v,x,

Re: [R] Extracting only multiple occurrences

2013-08-08 Thread Jim Lemon
On 08/08/2013 06:52 PM, Berend Hasselman wrote: On 08-08-2013, at 10:27, Jim Lemon wrote: On 08/08/2013 04:23 PM, Kevin Parent wrote: Well that almost works, and I didn't know about duplicated() so thanks for that. However, it only gives me the duplicated values. I need the original ones t

Re: [R] Extracting only multiple occurrences

2013-08-08 Thread Berend Hasselman
On 08-08-2013, at 10:27, Jim Lemon wrote: > On 08/08/2013 04:23 PM, Kevin Parent wrote: >> Well that almost works, and I didn't know about duplicated() so thanks for >> that. However, it only gives me the duplicated values. I need the original >> ones too. So the result I want is: [g,g,m,m,s,s

Re: [R] Extracting only multiple occurrences

2013-08-08 Thread Jim Lemon
On 08/08/2013 04:23 PM, Kevin Parent wrote: Well that almost works, and I didn't know about duplicated() so thanks for that. However, it only gives me the duplicated values. I need the original ones too. So the result I want is: [g,g,m,m,s,s,t,t,u,u,u,v,v,x,x,y,y,y]. What duplicated() gives me

Re: [R] Extracting only multiple occurrences

2013-08-07 Thread David Winsemius
le(26,10,1)])) > x<-x[duplicated(x)] > x<-sort(c(x,unique(x))) > _ > Kevin Parent, Ph.D > Korea Maritime University > From: David Winsemius > To: Kevin Parent > Cc: "r-help@r-project.org" > Sent: Thursday, August 8, 2013 3:03 PM > Subject: Re: [R]

Re: [R] Extracting only multiple occurrences

2013-08-07 Thread Kevin Parent
avid Winsemius Cc: "r-help@r-project.org" Sent: Thursday, August 8, 2013 3:03 PM Subject: Re: [R] Extracting only multiple occurrences On Aug 7, 2013, at 10:37 PM, Kevin Parent wrote: > Hoping someone here can help me with this small problem. > set.seed(2013) > >

Re: [R] Extracting only multiple occurrences

2013-08-07 Thread David Winsemius
On Aug 7, 2013, at 11:03 PM, David Winsemius wrote: > > On Aug 7, 2013, at 10:37 PM, Kevin Parent wrote: > >> Hoping someone here can help me with this small problem. >> set.seed(2013) >> >> x<-sort(c(letters,letters[sample(26,10,1)])) >> >> This gives a vector of 36 letters with some muliple

Re: [R] Extracting only multiple occurrences

2013-08-07 Thread David Winsemius
On Aug 7, 2013, at 10:37 PM, Kevin Parent wrote: > Hoping someone here can help me with this small problem. > set.seed(2013) > > x<-sort(c(letters,letters[sample(26,10,1)])) > > This gives a vector of 36 letters with some muliples (in this case, > g,m,s,t,u,v,x,y). Now what I need is to get ri

[R] Extracting only multiple occurrences

2013-08-07 Thread Kevin Parent
Hoping someone here can help me with this small problem. set.seed(2013) x<-sort(c(letters,letters[sample(26,10,1)])) This gives a vector of 36 letters with some muliples (in this case, g,m,s,t,u,v,x,y). Now what I need is to get rid of the ones that only occur once and keep the multiples. I nee