UniqueSeq {SSBtools} | R Documentation |
Sequence within unique values
Description
Sequence within unique values
Usage
UniqueSeq(x, sortdata = matrix(1L, length(x), 0))
Arguments
x |
vector |
sortdata |
matrix or vector to determine sequence order |
Value
integer vector
Author(s)
Øyvind Langsrud
Examples
# 1:4 within A and 1:2 within B
UniqueSeq(c("A", "A", "B", "B", "A", "A"))
# Ordered differently
UniqueSeq(c("A", "A", "B", "B", "A", "A"), c(4, 5, 20, 10, 3, 0))
[Package SSBtools version 1.5.2 Index]