Re: [R] question R regarding consecutive numbers

2011-10-28 Thread David Winsemius
3 5 1 1 -- David. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org ] On Behalf Of Samir Benzerfa Sent: Friday, October 28, 2011 12:35 AM To: 'David Winsemius'; 'Duncan Murdoch' Cc: r-help@r-project.org Subject: Re: [R] question R

Re: [R] question R regarding consecutive numbers

2011-10-28 Thread William Dunlap
> To: 'David Winsemius'; 'Duncan Murdoch' > Cc: r-help@r-project.org > Subject: Re: [R] question R regarding consecutive numbers > > In the general case, there is still a gap in your solution >sum( tbl["1", > 2:ncol(tbl)] ). This solution refers t

Re: [R] question R regarding consecutive numbers

2011-10-28 Thread Samir Benzerfa
n Murdoch Cc: Samir Benzerfa; r-help@r-project.org Betreff: Re: [R] question R regarding consecutive numbers On Oct 27, 2011, at 9:21 AM, Duncan Murdoch wrote: > On 27/10/2011 8:43 AM, Samir Benzerfa wrote: >> Hi everyone >> >> >> >> Do you know about any possibil

Re: [R] question R regarding consecutive numbers

2011-10-27 Thread David Winsemius
On Oct 27, 2011, at 9:21 AM, Duncan Murdoch wrote: On 27/10/2011 8:43 AM, Samir Benzerfa wrote: Hi everyone Do you know about any possibility in R to check for consecutive numbers in vectors? That is, I do not only want to count the number of observations in total (which can be done ta

Re: [R] question R regarding consecutive numbers

2011-10-27 Thread Duncan Murdoch
On 27/10/2011 8:43 AM, Samir Benzerfa wrote: Hi everyone Do you know about any possibility in R to check for consecutive numbers in vectors? That is, I do not only want to count the number of observations in total (which can be done table(x)), but I also want to count for instance how many ti

[R] question R regarding consecutive numbers

2011-10-27 Thread Samir Benzerfa
Hi everyone Do you know about any possibility in R to check for consecutive numbers in vectors? That is, I do not only want to count the number of observations in total (which can be done table(x)), but I also want to count for instance how many times that vector contains a certain number cons