如何在排序字符向量的数字时阻止R将字符串转换为数字?使用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"
答案 0 :(得分:1)
请参阅MrFlick的第二条评论:&#34; e +&#34;值实际上是arrange()