请问一下怎么同时取首尾的数值,想取前20个和后20个,但是cbind之后变成两列数据了
rt=read.table(inputFile, header=T, sep="\t", check.names=F, row.names=1)
GAIN=rowSums(rt> 0)
LOSS=rowSums(rt< 0)
LOSS=LOSS/ncol(rt)*100
top_genes <- sort(GAIN, decreasing = TRUE)[1:20]
top_genes2 <- sort(GAIN, decreasing = TRUE)[47:67]
top<-cbind(top_genes,top_genes2,)
buttom_genes <- sort(LOSS,decreasing = TRUE)[1:20][47:67]