Re: [R] How two compare two matrixes
http://sch.co.jp/ ã¨ã¹ã·ã¼ã¨ã¤ã http://sch.co.jp/ SCH http://sch.co.jp/ ãµãã«ã¼æ室ãç¥å¥å· http://www.taisei-erc.co.jp/ æ´¾é£ãæ¨ªæµ http://www.taisei-erc.co.jp/ 大æ http://www.taisei-erc.co.jp/ 人ææ´¾é£ã横æµå¸ http://awachuobus.jp 徳島ããã¹ http://awachuobus.jp é¿æ³¢ããã¹ http://awachuobus.jp 徳島ã観å http://www.central-golf.jp/ è±ç°ãã´ã«ãç·´ç¿å ´ http://www.central-golf.jp/ è±ç°ãã´ã«ã http://www.central-golf.jp/ ãã¨ã¿ãã´ã«ã http://www.yazawa-h.jp/ å®®ååºãå¸è°ä¼è°å¡ http://www.yazawa-h.jp/ å·å´å¸ãå¸è°ä¼è°å¡ http://www.yazawa-h.jp/ å·å´ãå¸è° http://matsuozaimokuten.com/ ä½è³ãææ¨ http://matsuozaimokuten.com/ ä½è³ãæ¨æ http://matsuozaimokuten.com/ ææ¨ãæ -- View this message in context: http://r.789695.n4.nabble.com/How-two-compare-two-matrixes-tp3334795p3581574.html Sent from the R help mailing list archive at Nabble.com. [[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.
Re: [R] How two compare two matrixes
?View -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Alaios > Sent: Friday, March 04, 2011 2:49 AM > To: r-help@r-project.org; Philipp Pagel > Subject: Re: [R] How two compare two matrixes > > That's the problem > Even a 10*10 matrix does not fit to the screen (10 columns do not fit > in one screen's row) and thus I do not get a well aligned matrix > printed. > > This is that makes comparisons not that easy to the eye. > From the other hand with edit(mymatrix) I get scrolls so I can scroll > to one row and see only the area I want to focus in. Problem with edit > is that it blocks cli and thus I can not have two edits running at the > same time. > > I would like to thank you in advacne for your help > > Regards > Alex > > --- On Fri, 3/4/11, Philipp Pagel wrote: > > > From: Philipp Pagel > > Subject: Re: [R] How two compare two matrixes > > To: r-help@r-project.org > > Date: Friday, March 4, 2011, 8:04 AM > > > Dear all I have two 10*10 > > matrixes and I would like to compare > > > theirs contents. By the word content I mean to check > > visually (not > > > with any mathematical formulation) how similar are the > > contents. > > > > If they are really only 10x10 you can simply print them > > both to the > > screen and look at them. I'm not sure what else you could > > do if you > > are not interested in a specific distance emasure etc. > > > > cu > > Philipp > > > > -- > > Dr. Philipp Pagel > > Lehrstuhl für Genomorientierte Bioinformatik > > Technische Universität München > > Wissenschaftszentrum Weihenstephan > > Maximus-von-Imhof-Forum 3 > > 85354 Freising, Germany > > http://webclu.bio.wzw.tum.de/~pagel/ > > > > __ > > 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. > > > > > > > __ > 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. __ 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.
Re: [R] How two compare two matrixes
I sometimes use the enclosed sideBySide() function to look at two printouts (of any sort of objects) in parallel. Perhaps that would help. sideBySide <- function (a, b, argNames) { oldWidth <- options(width = getOption("width")/2 - 4) on.exit(options(oldWidth)) if (missing(argNames)) { argNames <- c(deparse(substitute(a))[1], deparse(substitute(b))[1]) } pa <- capture.output(print(a)) pb <- capture.output(print(b)) nlines <- max(length(pa), length(pb)) length(pa) <- nlines length(pb) <- nlines pb[is.na(pb)] <- "" pa[is.na(pa)] <- "" retval <- cbind(pa, pb, deparse.level = 0) dimnames(retval) <- list(rep("", nrow(retval)), argNames) noquote(retval) } Try: > x1 <- matrix(sort(rnorm(100)),10,10) > x2 <- matrix(sort(rnorm(100)),10,10) > sideBySide(x1,x2) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Alaios > Sent: Thursday, March 03, 2011 11:42 PM > To: R-help@r-project.org > Subject: [R] How two compare two matrixes > > Dear all I have two 10*10 matrixes and I would like to > compare theirs contents. By the word content I mean to check > visually (not with any mathematical formulation) how similar > are the contents. > > I also know edit that prints my matrix in the scree but still > one edit blocks the prompt to launch a second edit() screen. > > What is the best way to compare these two matrices? > > I would like to thank you in avdance for your help > > Regards > Alex > > __ > 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. > __ 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.
Re: [R] How two compare two matrixes
Alaios wrote: That's the problem Even a 10*10 matrix does not fit to the screen (10 columns do not fit in one screen's row) and thus I do not get a well aligned matrix printed. I don't see why you would want to do this, but you could always invoke two instances of R and create one matrix in one and the other in the second. Peter Ehlers This is that makes comparisons not that easy to the eye. From the other hand with edit(mymatrix) I get scrolls so I can scroll to one row and see only the area I want to focus in. Problem with edit is that it blocks cli and thus I can not have two edits running at the same time. I would like to thank you in advacne for your help Regards Alex --- On Fri, 3/4/11, Philipp Pagel wrote: From: Philipp Pagel Subject: Re: [R] How two compare two matrixes To: r-help@r-project.org Date: Friday, March 4, 2011, 8:04 AM Dear all I have two 10*10 matrixes and I would like to compare theirs contents. By the word content I mean to check visually (not with any mathematical formulation) how similar are the contents. If they are really only 10x10 you can simply print them both to the screen and look at them. I'm not sure what else you could do if you are not interested in a specific distance emasure etc. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ 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. __ 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. __ 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.
Re: [R] How two compare two matrixes
> ?image > ?matrix > z<-matrix(rnorm(100),nrow=10) > image(1:10,1:10,z) > heatmap(z) > > Date: Fri, 4 Mar 2011 09:04:41 +0100 > From: p.pa...@wzw.tum.de > To: r-help@r-project.org > Subject: Re: [R] How two compare two matrixes > > > Dear all I have two 10*10 matrixes and I would like to compare > > theirs contents. By the word content I mean to check visually (not > > with any mathematical formulation) how similar are the contents. > > If they are really only 10x10 you can simply print them both to the > screen and look at them. I'm not sure what else you could do if you > are not interested in a specific distance emasure etc. > > cu > Philipp > > -- > Dr. Philipp Pagel > Lehrstuhl für Genomorientierte Bioinformatik > Technische Universität München > Wissenschaftszentrum Weihenstephan > Maximus-von-Imhof-Forum 3 > 85354 Freising, Germany > http://webclu.bio.wzw.tum.de/~pagel/ > > __ > 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. __ 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.
Re: [R] How two compare two matrixes
On Fri, Mar 04, 2011 at 01:49:29AM -0800, Alaios wrote: > That's the problem > Even a 10*10 matrix does not fit to the screen (10 columns do not > fit in one screen's row) and thus I do not get a well aligned matrix > printed. > > This is that makes comparisons not that easy to the eye. From the > other hand with edit(mymatrix) I get scrolls so I can scroll to one > row and see only the area I want to focus in. Problem with edit is > that it blocks cli and thus I can not have two edits running at the > same time. Hm - it does fit on my screen but if you're on a laptop... Maybe you could write both matrices to files and compare them in an external viewer (Excel, less, ...). If I remember correctly, the object browser/data viewer of JGR allows editing several objects at once. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ 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.
Re: [R] How two compare two matrixes
On 04.03.2011 08:42, Alaios wrote: Dear all I have two 10*10 matrixes and I would like to compare theirs contents. By the word content I mean to check visually (not with any mathematical formulation) how similar are the contents. I also know edit that prints my matrix in the scree but still one edit blocks the prompt to launch a second edit() screen. What is the best way to compare these two matrices? I would like to thank you in avdance for your help See ?image. Uwe Ligges Regards Alex __ 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. __ 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.
Re: [R] How two compare two matrixes
That's the problem Even a 10*10 matrix does not fit to the screen (10 columns do not fit in one screen's row) and thus I do not get a well aligned matrix printed. This is that makes comparisons not that easy to the eye. >From the other hand with edit(mymatrix) I get scrolls so I can scroll to one >row and see only the area I want to focus in. Problem with edit is that it >blocks cli and thus I can not have two edits running at the same time. I would like to thank you in advacne for your help Regards Alex --- On Fri, 3/4/11, Philipp Pagel wrote: > From: Philipp Pagel > Subject: Re: [R] How two compare two matrixes > To: r-help@r-project.org > Date: Friday, March 4, 2011, 8:04 AM > > Dear all I have two 10*10 > matrixes and I would like to compare > > theirs contents. By the word content I mean to check > visually (not > > with any mathematical formulation) how similar are the > contents. > > If they are really only 10x10 you can simply print them > both to the > screen and look at them. I'm not sure what else you could > do if you > are not interested in a specific distance emasure etc. > > cu > Philipp > > -- > Dr. Philipp Pagel > Lehrstuhl für Genomorientierte Bioinformatik > Technische Universität München > Wissenschaftszentrum Weihenstephan > Maximus-von-Imhof-Forum 3 > 85354 Freising, Germany > http://webclu.bio.wzw.tum.de/~pagel/ > > __ > 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. > __ 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.
Re: [R] How two compare two matrixes
> Dear all I have two 10*10 matrixes and I would like to compare > theirs contents. By the word content I mean to check visually (not > with any mathematical formulation) how similar are the contents. If they are really only 10x10 you can simply print them both to the screen and look at them. I'm not sure what else you could do if you are not interested in a specific distance emasure etc. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ 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.