Re: [R] Which() missing a number

2014-03-18 Thread Frede Aakmann Tøgersen
2014 12:42 > To: r-help@r-project.org > Subject: Re: [R] Which() missing a number > > ... and it is also missing the 15 at position 15. > > Can't explain but > > > which( neilist %in% pfriends ) > > should give you what you want. > > > > O

Re: [R] Which() missing a number

2014-03-18 Thread Duncan Murdoch
On 18/03/2014 7:14 AM, Thomas wrote: Does anyone know why this is happening? Which() is picking up the indices of the numbers 13 and 15 in neilist, but it's missing out the 13 at index 6. Thank you, Thomas Chesney > neilist [1] 13 15 28 29 30 13 14 15 28 30 43 44 45 14 15 29 44 45 > pf

Re: [R] Which() missing a number

2014-03-18 Thread Rainer Schuermann
... and it is also missing the 15 at position 15. Can't explain but > which( neilist %in% pfriends ) should give you what you want. On Tuesday 18 March 2014 11:14:08 Thomas wrote: > Does anyone know why this is happening? Which() is picking up the > indices of the numbers 13 and 15 in

Re: [R] Which() missing a number

2014-03-18 Thread Sicotte, Hugues, Ph.D.
I think you want to do which(neilist %in% pfriends) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Thomas Sent: Tuesday, March 18, 2014 6:14 AM To: r-help@r-project.org Subject: [R] Which() missing a number Does anyone know why

[R] Which() missing a number

2014-03-18 Thread Thomas
Does anyone know why this is happening? Which() is picking up the indices of the numbers 13 and 15 in neilist, but it's missing out the 13 at index 6. Thank you, Thomas Chesney > neilist [1] 13 15 28 29 30 13 14 15 28 30 43 44 45 14 15 29 44 45 > pfriends [1] 13 15 > which(neilist==pfrie