R 按照某一列的值重新排序dataframe
library(data.table)
setorder(setDT(Spot_manifest)[, barcode := colnames(count)], barcode)
library(data.table)
setorder(setDT(DF)[, index := factor(index, levels = ord)], index)
library(data.table)
setorder(setDT(Spot_manifest)[, barcode := colnames(count)], barcode)
library(data.table)
setorder(setDT(DF)[, index := factor(index, levels = ord)], index)