Is there a way to take equal elements out of a list and their position???
An example can be
v = {13.51, 13.51, 12.36, 12.36, 12.36, 12.36, 12.85, 12.85, 12.85, 12.85}
with desired output a list like:
{{13.51, 12.36, 12.85},{2,4,4}}
where on the left there are the elements written with the correct order and on the right how many times they repeat. The elements in the starting list are considered to be ordered. Thanks
Tally[v]//Transpose
not do what you want? If not, perhaps you could post the expected outcome for v andv = {1, 3, 3, 3, 4, 4, 4}
? $\endgroup$ – user1066 Sep 17 '20 at 9:34