Hi Hari, Here is a suggestion:
with(x, aggregate(x[,-1], list(probename), median)) where x is your data set. HTH, Jorge On Thu, Feb 25, 2010 at 4:25 PM, Harikrishnadhar <> wrote: > Dear All, > > I am analyzing the miRNA data set in which I have 817 unique probes for > each > they have 20 features each . I have to group the similar features and take > the median across them so that I have a data with no repeats to perform > invariant analysis . > > My data looks something similar format > > probename sample1 sample2 sample3 > A 2.3 2.4 2.5 > A 8.9 3.6 7.9 > A 4.7 4.4 2.2 > C 2.2 2.1 2.3 > C 1.3 1.3 2.9 > B 2.2 2.1 2.7 > B 2.2 2.1 2.8 > > I want to get some thing like after the means for similar probename are > calculated > A 2.3 2.4 2.5 > B 8.9 3.6 7.9 > C 2.2 2.1 2.8 > I have to group the probename elements and and get median across them. > Please help with this so that I can get complete my analysis . > > > > > > -- > Thanks > Hari > 215-385-4122 > > > > > > > > > > > > > > > > > > > > > > > "If there is anyone out there who still doubts that America is a place > where > all things are possible" > > > > -- > Thanks > Hari > 215-385-4122 > > > > > > > > > > > > > > > > > > > > > > > "If there is anyone out there who still doubts that America is a place > where > all things are possible" > > [[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. > [[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.