Hi all,

say, I have following vector :

x <- c(rep(5, 5), rep(3,4), rep(5,10))

Now I want to get the index numbers where elements of that vector changes
i.e. in above example I want to get a vector with elements : 6, 10. Because
at that indices, element of original vector changes value.

Is there any R function to do that?

Regards,

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to