How can I stop R from converting strings to numeric while sorting a character vector of numbers? example using dplyr
arrange()
:
nomenclature <- read_csv2(file('~/nomenclature.txt', encoding="UTF-8"))
head(nomenclature$NOMENCLATURE)
[1] "8414900090" "6108320000" "8517709000" "6104430000" "4202310090" "8479908099"
nomenclature <- nomenclature %>% arrange(NOMENCLATURE)
head(nomenclature$NOMENCLATURE)
[1] "1.52e+09" "1.801e+09" "1.804e+09" "1.805e+09" "1001190030" "1001990094"