Yes, Phil! You are right, I forgot put the bo.id.pred$ ahead of predict. Thanks!
On Wed, May 5, 2010 at 9:48 AM, Phil Spector <spec...@stat.berkeley.edu>wrote: > Changbin - > Perhaps you meant > > b.order = bo.id.pred[order(bo.id.pred$predict,decreasing=TRUE),] > > - Phil Spector > Statistical Computing Facility > Department of Statistics > UC Berkeley > spec...@stat.berkeley.edu > > > On Wed, 5 May 2010, Changbin Du wrote: > > #sort the data by predicted probability >>> b.order<-bo.id.pred[(order(-predict)),] >>> b.order[1:20,] >>> >> gene_id predict >> 43 637882902 0.07823997 >> 53 638101634 0.66256490 >> 61 639084581 0.08587504 >> 41 637832824 0.02461066 >> 25 637261662 0.11613879 >> 22 637240022 0.06350477 >> 62 639084582 0.02238538 >> 63 639097718 0.06792841 >> 44 637943079 0.04532625 >> 80 640158389 0.06582658 >> 3 637006517 0.57648451 >> 49 638072100 0.01391633 >> 4 637007046 0.08999928 >> 13 637047086 0.01493464 >> 74 639787397 0.01283783 >> 58 638936569 0.29182988 >> 24 637261661 0.02561841 >> 59 639006028 0.31732711 >> 38 637585227 0.31272531 >> 35 637399473 0.10687524 >> >> >> >> HI, Dear R community, >> >> I am sorting the data set bo.id.pred by variable predict, why it does not >> work? The sequence changed compared with original data set, but you can >> not >> read any descending pattern. >> >> Thanks! >> >> -- >> Sincerely, >> Changbin >> -- >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> >> -- Sincerely, Changbin -- Changbin Du DOE Joint Genome Institute Bldg 400 Rm 457 2800 Mitchell Dr Walnut Creet, CA 94598 Phone: 925-927-2856 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.