MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,=0A=0AI'd like to replace rows in a matrix which differ only in their va= lues for one numerical column ("Vx") by a single row in which the value for= Vx is replaced by the median of Vx in the original rows. Vx is always the = same column.=0ASo far, I got the reduced matrix without the Vx-column using= :=0A=0Areduced_mat <- unique(original_mat[,-indVx])=0A=0Awhere "indVx" stan= ds for the number of the Vx-column. Now I still need to get the column with= the corresponding medians for the unified entries. How can I do this effic= iently (i.e. without for-loops, etc.)?=0A=0AMany thanks in advance,=0ARaine= r=0A=0AWikipediaWictionaryChambers (UK)Google imagesGoogle defineThe Free D= ictionaryJoin exampleWordNetGoogleUrban DictionaryAnswers.comrhymezone.comM= erriam-Webster<>0=0Awvcidfjoguarm=0A=0A=0A ______________________________________________ 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.