Re: [R] pairs: adjusting margins and labeling axes

2016-07-20 Thread William Michels via R-help
Hi Michael, is this the direction you'd like to go (simplified)? ?pairs pairs(iris, log="xy", asp=1, gap=0.1) --Bill. On Tue, Jul 19, 2016 at 2:37 PM, Michael Young wrote: > I want to make this as easy as possible. The extra space could just go > around the plot in the

Re: [R] pairs: adjusting margins and labeling axes

2016-07-20 Thread Michael Young
I want to make this as easy as possible. The extra space could just go around the plot in the margin area. I could then use a cropping tool to paste the plot into Excel or Word. I'm not opposed to using another package, but I'd need some kind of pre-existing code to tinker with. On Tue, Jul

Re: [R] pairs: adjusting margins and labeling axes

2016-07-19 Thread Duncan Mackay
n Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home: mac...@northnet.com.au -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of michael young Sent: Wednesday, 20 July 2016 03:30 To: r-help@r-project.org Su

Re: [R] pairs: adjusting margins and labeling axes

2016-07-19 Thread Greg Snow
If you want square plots on a rectangular plotting region, then where do you want the extra space to go? One option would be to add outer margins to use up the extra space. The calculations to figure out exactly how much space to put in the outer margins will probably not be trivial. Another

[R] pairs: adjusting margins and labeling axes

2016-07-19 Thread michael young
The default shape for this correlation scatterplot is rectangle. I changed it to square, but then the x-axis spacing between squares are off. Is there an easy way to change x-axis spacing between squares to that of the y-axis spacing size? I decided to hide the name values of the diagonal

[R] pairs plot

2013-10-10 Thread Witold E Wolski
my data are matrix with 3 numeric columns. would like to have pairs plot with scatterplots in the upper with hist at the diag and with correlation at the lower. actually default pairs does almost what I want but looks semi awesome. Especially, i didn't find out how to remove the axes from the

Re: [R] pairs plot

2013-10-10 Thread Jim Lemon
On 10/11/2013 02:01 AM, Witold E Wolski wrote: my data are matrix with 3 numeric columns. would like to have pairs plot with scatterplots in the upper with hist at the diag and with correlation at the lower. actually default pairs does almost what I want but looks semi awesome. Especially, i

[R] pairs(X,Y) analog of cor(X,Y)?

2013-03-29 Thread Michael Friendly
With a data frame containing some X Y variables I can get the between set correlations with cor(X,Y): cor(NLSY[,1:2], NLSY[3:6]) antisochyperact income educ math 0.043381307 -0.07581733 0.25487753 0.2876875 read -0.003735785 -0.07555683 0.09114299 0.1884101 Is there

Re: [R] pairs(X,Y) analog of cor(X,Y)?

2013-03-29 Thread Greg Snow
There is the pairs2 function in the TeachingDemos package that works like cor(x,y) where you give it 2 matricies/data frames and it gives the pairwise plots between the 2 groups. There is currently not a formula interface. On Fri, Mar 29, 2013 at 12:16 PM, Michael Friendly

Re: [R] pairs(), expression in label and color in text.panel

2011-11-25 Thread Uwe Ligges
On 24.11.2011 15:59, Johannes Radinger wrote: Hello, I'd like to add custom labels to my pair() plot. These labels include math expression but they aren't correctly displayed... Looks fine for me in R-2.14.0 on the windows() device (alpha, text, beta). (Both version and device you used are

[R] pairs(), expression in label and color in text.panel

2011-11-24 Thread Johannes Radinger
Hello, I'd like to add custom labels to my pair() plot. These labels include math expression but they aren't correctly displayed... Further, I want that the boxes for the text.panel (diagonal) have an other background color (grey80). Is that generally possible? If yes how do I have to set it?

Re: [R] pairs(), no axis labels/values for upper panel?

2011-11-15 Thread B77S
Steffen, Did you ever have luck getting rid of the tick marks?... I like your idea and have modified it, but yes, the tick marks need to go. Steffen Fleischer wrote: Dear all, I want to draw a graph that contains the scatterplot matrix in the lower panel and coefficients in the upper

[R] pairs(), no axis labels/values for upper panel?

2011-01-24 Thread Steffen Fleischer
Dear all, I want to draw a graph that contains the scatterplot matrix in the lower panel and coefficients in the upper panel. I used and adapted the example for the function pairs but cannot figure out how to get no values and ticks in the upper panel (the values should only be in the lower

[R] pairs and mfrow

2010-09-27 Thread Mike Harwood
Is there an alternative to par(mfrow=c(2,1)) to get stacked scatterplot matrixes generated with pairs? I am using version 2.11.1 on Windows XP. The logic I am using follows, and the second pairs plot replaces the first plot in the current graphics device, which is not what I expected (or

Re: [R] pairs and mfrow

2010-09-27 Thread Greg Snow
Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Mike Harwood Sent: Monday, September 27, 2010 6:51 AM To: r-help@r-project.org Subject: [R] pairs and mfrow Is there an alternative to par

[R] pairs and panel.smooth for two groups

2010-09-08 Thread Marie-Pierre Sylvestre
Hi, I have modified the USJudgeRatings data (available in R) to illustrate my question. # Use the first 4 variables of USJudgeRatings and add a group variable with two levels USJudgeRatings - USJudgeRatings[,1:4] USJudgeRatings$group - factor(c(rep(1, 22), rep(0, 21))) # I can draw a pairs

Re: [R] pairs and panel.smooth for two groups

2010-09-08 Thread Greg Snow
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Marie-Pierre Sylvestre Sent: Wednesday, September 08, 2010 8:03 AM To: r-help@r-project.org Subject: [R] pairs and panel.smooth for two groups Hi, I have modified

Re: [R] pairs with same xlim and ylim scale

2010-09-03 Thread Dejian Zhao
in the panel.cor function. Adding ... in the function and text call fixed everything. Best, ...Tao - Original Message From: Dejian Zhaodejian.z...@gmail.com To: r-help@r-project.org Sent: Thu, September 2, 2010 7:57:55 PM Subject: Re: [R] pairs with same xlim and ylim scale When pairs

Re: [R] pairs with same xlim and ylim scale

2010-09-02 Thread Shi, Tao
Hi Dejian, You're right on this! Do you know how to pass those two argument into lower.panel? Thanks! ...Tao From: Dejian Zhao zha...@ioz.ac.cn To: r-help@r-project.org Sent: Tue, August 31, 2010 6:10:16 PM Subject: Re: [R] pairs with same xlim and ylim

Re: [R] pairs with same xlim and ylim scale

2010-09-02 Thread Dejian Zhao
. On 2010-9-2 15:15, Shi, Tao wrote: Hi Dejian, You're right on this! Do you know how to pass those two argument into lower.panel? Thanks! ...Tao From: Dejian Zhaozha...@ioz.ac.cn To:r-help@r-project.org Sent: Tue, August 31, 2010 6:10:16 PM Subject: Re: [R

[R] pairs with same xlim and ylim scale

2010-08-31 Thread Shi, Tao
Hi list, I have a function which basically is a wrapper of pairs with some useful panel functions. However, I'm having trouble to pass the xlim and ylim into the function so the x and y axes are in the same scale and 45 degree lines are exactly diagonal. I've looked at some old posts, they

Re: [R] pairs with same xlim and ylim scale

2010-08-31 Thread Dejian Zhao
I think you have successfully passed the xlim and ylim into the function pairs1. Compare the two graphs produced by the codes you provided, you can find the xlim and ylim in the second graph have been reset to the assigned value. It seems that the program halted in producing the second plot

Re: [R] pairs

2009-11-16 Thread David Winsemius
I'm not convinced it's right. In fact, I'm pretty sure the last step taking only the first half of the list is wrong. I also do not know if you have considered how you want to count situations like: 3 2 7 4 5 7 ... 7 3 8 6 1 2 9 2 .. How many pairs of 2-7/7-2 would that represent? --

Re: [R] pairs

2009-11-16 Thread David Winsemius
I stuck in another 7 in one of the lines with a 2 and reasoned that we could deal with the desire for non-ordered pair counting by pasting min(x,y) to max(x,y); dput(prmtx) structure(c(2, 1, 3, 9, 5, 7, 7, 8, 1, 7, 6, 5, 6, 2, 2, 7), .Dim = c(4L, 4L)) prmtx [,1] [,2] [,3] [,4] [1,]

Re: [R] pairs

2009-11-16 Thread cindy Guo
I forgot to say that there are no ties in each row. So any number can occur only once in each row. Also as I mentioned earlier, actually I only need the top 50 most frequent pairs, is there a more efficient way to do it? Because I have 15000 numbers, output of all the pairs would be too long.

Re: [R] pairs

2009-11-16 Thread David Winsemius
On Nov 16, 2009, at 2:32 PM, cindy Guo wrote: I forgot to say that there are no ties in each row. So any number can occur only once in each row. Also as I mentioned earlier, actually I only need the top 50 most frequent pairs, is there a more efficient way to do it? Because I have

Re: [R] pairs

2009-11-16 Thread cindy Guo
Do you mean if the numbers in each row are ordered? They are not, but if it's needed, we can order them. The matrix only has 5000 rows. On Mon, Nov 16, 2009 at 1:34 PM, David Winsemius dwinsem...@comcast.netwrote: On Nov 16, 2009, at 2:32 PM, cindy Guo wrote: I forgot to say that there are

Re: [R] pairs

2009-11-16 Thread cls59
David Winsemius wrote: ?order cindy Guo wrote: Do you mean if the numbers in each row are ordered? They are not, but if it's needed, we can order them. The matrix only has 5000 rows. No, he's suggesting you check out the order() function by calling it's help page: ?order order()

Re: [R] pairs

2009-11-16 Thread David Winsemius
On Nov 16, 2009, at 2:41 PM, cindy Guo wrote: Do you mean if the numbers in each row are ordered? They are not, but if it's needed, we can order them. The matrix only has 5000 rows. No, I mean type ?order at the R command line and read the help page. On Mon, Nov 16, 2009 at 1:34 PM,

Re: [R] pairs

2009-11-16 Thread cindy Guo
Thank you. I will check that. Cindy On Mon, Nov 16, 2009 at 1:45 PM, cls59 ch...@sharpsteen.net wrote: David Winsemius wrote: ?order cindy Guo wrote: Do you mean if the numbers in each row are ordered? They are not, but if it's needed, we can order them. The matrix only has 5000

[R] pairs

2009-11-15 Thread cindy Guo
Hi, All, I have an n by m matrix with each entry between 1 and 15000. I want to know the frequency of each pair in 1:15000 that occur together in rows. So for example, if the matrix is 2 5 1 6 1 7 8 2 3 7 6 2 9 8 5 7 Pair (2,6) (un-ordered) occurs together in rows 1 and 3. I want to return the

Re: [R] pairs

2009-11-15 Thread cls59
cindy Guo wrote: Hi, All, I have an n by m matrix with each entry between 1 and 15000. I want to know the frequency of each pair in 1:15000 that occur together in rows. So for example, if the matrix is 2 5 1 6 1 7 8 2 3 7 6 2 9 8 5 7 Pair (2,6) (un-ordered) occurs together in rows

Re: [R] pairs

2009-11-15 Thread Linlin Yan
Hope this help: m - matrix(c(2,1,3,9,5,7,7,8,1,8,6,5,6,2,2,7),4,4) p - c(2, 6) apply(m == p[1], 1, any) apply(m == p[2], 1, any) [1] TRUE FALSE TRUE FALSE If you want the number of rows which contain the pair, sum() could be used: sum(apply(m == p[1], 1, any) apply(m == p[2], 1, any))

Re: [R] pairs

2009-11-15 Thread cindy Guo
Hi, Charlie, Thank you for the reply. Maybe I don't need the frequency of each pair. I only need the top, say 50, pairs with the highest frequency. Is there anyway which can avoid calculating for all the pairs? Thanks, Cindy On Sun, Nov 15, 2009 at 4:18 PM, cls59 ch...@sharpsteen.net wrote:

Re: [R] pairs

2009-11-15 Thread David Winsemius
I could of course be wrong but have you yet specified the number of columns for this pairing exercise? On Nov 15, 2009, at 5:26 PM, cindy Guo wrote: Hi, All, I have an n by m matrix with each entry between 1 and 15000. I want to know the frequency of each pair in 1:15000 that occur

Re: [R] pairs

2009-11-15 Thread David Winsemius
Assuming that the number of columns is 4, then consider this approach: prs -scan() 1: 2 5 1 6 5: 1 7 8 2 9: 3 7 6 2 13: 9 8 5 7 17: Read 16 items prmtx - matrix(prs, 4,4, byrow=T) #Now make copus of x.y and y.x pair.str - sapply(1:nrow(prmtx), function(z) c(apply(combn(prmtx[z,], 2),

Re: [R] pairs

2009-11-15 Thread cindy Guo
Hi, David, The matrix has 20 columns. Thank you very much for your help. I think it's right, but it seems I need some time to figure it out. I am a green hand. There are so many functions here I never used before. :) Cindy On Sun, Nov 15, 2009 at 5:19 PM, David Winsemius

[R] pairs

2009-10-14 Thread Seyit Ali Kayis
Dear all, I have two sets of data (say set1 and set2) as follow: set1 x1 x2 x3 0.30 0.43 3.88 0.38 0.59 3.53 0.30 0.42 2.12 0.33 0.53 2.12 0.30 0.47 3.76 set2 y1 y2 y3 0.32 0.47 5.18 0.23 0.26 1.06 0.42 0.65 3.88 0.28 0.38 3.76 0.35 0.47 1.41 The pairs

Re: [R] pairs

2009-10-14 Thread Greg Snow
] On Behalf Of Seyit Ali Kayis Sent: Wednesday, October 14, 2009 6:35 AM To: r-help@r-project.org Subject: [R] pairs Dear all, I have two sets of data (say set1 and set2) as follow: set1 x1 x2 x3 0.30 0.43 3.88 0.38 0.59 3.53 0.30 0.42 2.12 0.33

Re: [R] pairs

2009-10-14 Thread Greg Snow
, October 14, 2009 11:13 AM To: Seyit Ali Kayis; r-help@r-project.org Subject: Re: [R] pairs Does the pairs2 function in the TeachingDemos package do what you want? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111

Re: [R] pairs plot

2009-07-28 Thread Jose Narillos de Santos
Santos Sent: Monday, July 27, 2009 9:02 AM To: r-help@r-project.org Subject: [R] pairs plot Hi all, I want to plot trough pairs() plot a matrix with 4 columns. I want to make a trhee plot in a graph. Plotting pairs colum 2,3,4 on y axis and 1 on X axis. You mean (a plot with three

Re: [R] pairs plot

2009-07-28 Thread Petr PIKAL
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Jose Narillos de Santos Sent: Monday, July 27, 2009 9:02 AM To: r-help@r-project.org Subject: [R] pairs plot Hi all, I want to plot trough pairs() plot

Re: [R] pairs plot

2009-07-28 Thread Jose Narillos de Santos
-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Jose Narillos de Santos Sent: Monday, July 27, 2009 9:02 AM To: r-help@r-project.org Subject: [R] pairs plot Hi all, I want to plot trough pairs() plot a matrix with 4 columns. I want

Re: [R] pairs plot

2009-07-28 Thread John Kane
Have you installed it first? First: install.packages(TeachingDemos) Then: library(TeachingDemos) --- On Tue, 7/28/09, Jose Narillos de Santos narillosdesan...@gmail.com wrote: From: Jose Narillos de Santos narillosdesan...@gmail.com Subject: Re: [R] pairs plot To: Petr PIKAL petr.pi

Re: [R] pairs plot

2009-07-28 Thread Petr PIKAL
it to library subdirectory. Then: library(TeachingDemos) shall be executed without problem Regards Petr --- On Tue, 7/28/09, Jose Narillos de Santos narillosdesan...@gmail.com wrote: From: Jose Narillos de Santos narillosdesan...@gmail.com Subject: Re: [R] pairs plot To: Petr PIKAL petr.pi

[R] pairs plot

2009-07-27 Thread Jose Narillos de Santos
Hi all, I want to plot trough pairs() plot a matrix with 4 columns. I want to make a trhee plot in a graph. Plotting pairs colum 2,3,4 on y axis and 1 on X axis. You mean (a plot with three graphs) ommitting the first pair with itself. And only the pairs with colum 1 with the other not all

Re: [R] pairs plot

2009-07-27 Thread Greg Snow
Narillos de Santos Sent: Monday, July 27, 2009 9:02 AM To: r-help@r-project.org Subject: [R] pairs plot Hi all, I want to plot trough pairs() plot a matrix with 4 columns. I want to make a trhee plot in a graph. Plotting pairs colum 2,3,4 on y axis and 1 on X axis. You mean (a plot

[R] pairs of numbers

2009-03-13 Thread emj83
Hi, I have two lists of numbers which are both 1,2,3,4. I would like to combine pairs so that I have: 1,2 1,3 1,4 2,3 2,4 3,4. I know that expand.grid() can give me all combinations of pairs. Any suggestions would be much appreciated. Emma -- View this message in context:

Re: [R] pairs of numbers

2009-03-13 Thread emj83
I have solved my problem using: x-1:4 x [1] 1 2 3 4 combn(x,2) [,1] [,2] [,3] [,4] [,5] [,6] [1,]111223 [2,]234344 Thanks Emma emj83 wrote: Hi, I have two lists of numbers which are both 1,2,3,4. I would like to combine pairs so

Re: [R] pairs() help - colour histograms on diagonal

2009-02-03 Thread Duncan Murdoch
Nathan S. Watson-Haigh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'd like to be able to colour histograms along the diagonal using the colours stored in colnames(d): d blackbluebrowncyan 1 0.96405751 -0.02964390 -0.060147424 -0.06460070 2

[R] pairs() help - colour histograms on diagonal

2009-02-02 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'd like to be able to colour histograms along the diagonal using the colours stored in colnames(d): d blackbluebrowncyan 1 0.96405751 -0.02964390 -0.060147424 -0.06460070 2 -0.03614607 0.95475444 -0.152382053

Re: [R] pairs plots in R

2008-10-20 Thread Antony Unwin
ideas. Antony Unwin Professor of Computer-Oriented Statistics and Data Analysis, Mathematics Institute, University of Augsburg, 86135 Augsburg, Germany Tel: + 49 821 5982218 From: Sharma, Dhruv [EMAIL PROTECTED] Date: 19 October 2008 10:58:53 pm GMT+02:00 To: r-help@r-project.org Subject: [R

Re: [R] pairs plots in R

2008-10-20 Thread Sharma, Dhruv
Thanks Felix. Regards, Dhruv -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Felix Andrews Sent: Sunday, October 19, 2008 11:37 PM To: Sharma, Dhruv Cc: r-help@r-project.org Subject: Re: [R] pairs plots in R One idea: if the primary variable

Re: [R] pairs plots in R

2008-10-20 Thread Sharma, Dhruv
thanks Antony. regards, Dhruv From: Antony Unwin [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2008 7:00 AM To: r-help@r-project.org Cc: Sharma, Dhruv Subject: Re: [R] pairs plots in R If you want to do efficient exploratory data analysis on this kind

Re: [R] pairs plots in R

2008-10-19 Thread Felix Andrews
One idea: if the primary variable of interest is a categorical (binary), I would rather look at univariate plots for each of your 100 variables, grouped by the primary one. e.g. library(latticeExtra) marginal.plot(~ myBigDat, data = myBigData, groups = myBinaryVar, auto.key = TRUE,

[R] Pairs() function: selective changing of ylim; use of key

2008-07-25 Thread David Afshartous
All, Two questions RE scatterplot matrices produced via pairs() function: 1) Is it possible to selectively change the ylim of one of the subplots? 2) Is a key allowed? I don't seem to be able to insert a manual key. Code below: dat = data.frame(Hour= rep(c(0:3), 4), Y1 = rnorm(16,1), Y2 =

[R] pairs diagram of qq plots?

2008-04-21 Thread Dr. Stefan Reisner
Hello everyone, for some exploratory analysis I would like to compare the distribution of an observable WERT pairwise between several samples identified by STICHPROBE (which differ in size). str(stichproben_o1o4_20080327ff[c(STICHPROBE, WERT)]) 'data.frame': 6087 obs. of 2 variables: $

[R] pairs, par(plt)

2007-10-20 Thread Oliver Soong
I'm having some confusion over the coordinate system after using pairs. I'm not interested in the content of the actual pairs plot, although the number of pairs seems to matter a bit. I'm purely interested in knowing where my points will be plotted on the device. However, after using pairs, the