[R] Quick help needed in coding quantile normalization

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sat Oct 26 10:32:38 CEST 2013

Couple of problems:

1) The Posting Guide clearly states that this is not a homework help forum. We don't know what rules your study is constrained by, but if you are doing homework then we do know you have resources at your educational institution to rely on.

2) If this is not homework, why the reluctance to rely on tested code?

3) Your code is not reproducible. If we were to be able to assist you, you should be supplying appropriate sample data with which you could demonstrate your problem and desired solution.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

helpwperl <Ssabri1 at jhu.edu> wrote:
>I'm trying to code quantile normalization without using any fancy
>(e.g., normalizeBetweenArrays(), normalize.quantities(), etc.). I'm
>having a
>hard time trying to re-order the columns of my means matrix to match
>original unsorted matrix. I assume I will have to somehow utilize
>order() or
>rank() but I'm having a hard time doing so. I'm essentially attempting
>mirror what is being performed on the third slide of page seven of this
>lecture. I've posted below my current code:
>samp <- cbind(samp1, samp2, samp3, samp4)
>colnames(samp) <- c("samp1", "samp2", "samp3", "samp4")
>samp.sorted <- apply(samp, 2, sort) 
>row.means <- rowMeans(samp.sorted, na.rm = FALSE)
>row.means <- as.matrix(row.means)
>row.means <- cbind(row.means, row.means, row.means, row.means)
>Any help would be greatly appreciated. 
>View this message in context:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list