Displaying 1 result from an estimated 1 matches for "tp2228373p2228427".
2010 May 24
6
switching elements of a vector
Hi,
I would like to receive help for the following matter:
If I'm dealing with a numeric vectors containing increasing elements.
i.e.
a<-c(1,2,2,2,2,3,3,3,4,4,4,5,5,6,7,7,7)
There exist an efficient way to obtain an vector that indicates the position
of the changing element of "a"?
In this case it would be something like:
index<-c(1,6,9,12,14,15)
usually I'm used