The point was that I thought you had reversed the intent of the t/f
values. Looking back at the OP's request I see that it was probably me
that was doing the reversal. Pardon me.
--
David Winsemius
On Jun 2, 2009, at 9:40 PM, Gabor Grothendieck wrote:
Its not clear to me what your point i
Its not clear to me what your point is. Perhaps you
could elaborate.
On Tue, Jun 2, 2009 at 4:32 PM, David Winsemius wrote:
> Gabor;
>
> Did you perhaps get an undesired doubling of "!"?
>
>> x1 <-c("A", "A", "B", "B", "B", "A")
>> x1[2:length(x1)] == x1[1:(length(x1)-1)]
> [1] TRUE FALSE TRUE
Gabor;
Did you perhaps get an undesired doubling of "!"?
> x1 <-c("A", "A", "B", "B", "B", "A")
> x1[2:length(x1)] == x1[1:(length(x1)-1)]
[1] TRUE FALSE TRUE TRUE FALSE
> !!diff(c(factor(x1)))
[1] FALSE TRUE FALSE FALSE TRUE
(Your trick of computing differences of the underlying factor
> c(x[1], x[-length(x)]) != x
[1] FALSE FALSE FALSE TRUE TRUE FALSE TRUE
On Mon, Jun 1, 2009 at 11:57 PM, liujb wrote:
>
> Hello,
>
> I have a vector:
> x <- c("A", "A", "A", "B", "A", "A", "C")
>
> I'd like to compare each of elements of vector x from its previous element
> (except for the 1s
Try this:
c(FALSE, !!diff(c(factor(x
On Mon, Jun 1, 2009 at 11:57 AM, liujb wrote:
>
> Hello,
>
> I have a vector:
> x <- c("A", "A", "A", "B", "A", "A", "C")
>
> I'd like to compare each of elements of vector x from its previous element
> (except for the 1st element which does not have pre
5 matches
Mail list logo