Hello there, would you please look into my codes? Here I have following:

> set.seed(100)
> samp <- sample(c(1,-1,0), 20, replace=T); samp
 [1]  1  1 -1  1 -1 -1  0 -1 -1  1 -1  0  1 -1  0  0  1 -1 -1  0

Here I want to calculate the length of each unique number for above vector.
How can I do that?

Thanks in advance

	[[alternative HTML version deleted]]

