I have vector with characters:
y <- c('B','Ā','Č','D','Ē','E')
When I sort using order for vector
y2 <- y[order(y)]
y2
[1] "Ā" "B" "Č" "D" "E" "Ē"
y2 <- data.table(y = y2)
If I make vector as data.table and sort with setkeyv then can not get the same result as y2.
test2 <- data.table(y)
setkeyv(test2, "y")
test2
identical(y2, test2)
Maybe can give some solution for this situation?
I have vector with characters:
y <- c('B','Ā','Č','D','Ē','E')
When I sort using order for vector
y2 <- y[order(y)]
y2
[1] "Ā" "B" "Č" "D" "E" "Ē"
y2 <- data.table(y = y2)
If I make vector as data.table and sort with setkeyv then can not get the same result as y2.
test2 <- data.table(y)
setkeyv(test2, "y")
test2
identical(y2, test2)
Maybe can give some solution for this situation?