If x is numeric and all values are whole numbers use the sequence between the smallest and the highest value
defaultLevels(x, step = 1)
x | numeric or character vector |
---|---|
step | step to be used in sequence generation |
if x
is numeric the sequence between the lowest and highest
value in x
with the given step
is returned. If x
is a
vector of character strings, the sorted unique values are returned.
defaultLevels(c(1, 3, 4, 5, 4))#> [1] 1 2 3 4 5defaultLevels(c(1920, 1950, 1970), step = 10)#> [1] 1920 1930 1940 1950 1960 1970