[R] Fwd: ADF test
Can anyone help me to see why maximum t-stat quantile has no Negative values? ¿It is posible lm estimation is not fine? -- Forwarded message -- From: Jose Narillos de Santos narillosdesan...@gmail.com Date: 2013/9/8 Subject: ADF test To: r-help r-help@r-project.org Hi all, I try to simulate an ADF test rolling on a window. The thing is that it seems I´m doing well...applying to al AR(1) model with unit root. I see in some econometrical papers that the t-stat maximum and minimum should have negative values on the quantiles 0,01 to 0,03 and in my case only the minimum are negative values. ¿It is posible I´m doing wrong calculus on lm? I m getting mad Ob - 100 Re - 50 H2-matrix(0,Ob,Re) for (j in 1:Re){ for (i in 2:Ob){ H2[i, j] -1+ 1*H2[i-1, j]+rnorm(1) } } H3-matrix(0,Ob,Re) for (i in 2:Ob){ for (j in 1:Re){ H3[i,j]-H2[i,j]-H2[i-1,j] }} a3-H3[2:nrow(H3),1:ncol(H3)] a2-H2[1:(nrow(H2)-1),1:ncol(H2)] write.csv(a3,a3.csv) write.csv(a2,a2.csv) a3-read.csv(a3.csv) a2-read.csv(a2.csv) delta-round(Ob*(1/3)) fg-matrix(0,nrow(H3)-delta+1,Re) for (j in 1:Re){ for (i in delta:nrow(H3) ){ z2-(i-delta+1) z3-i fg[i-delta+1,j]-coef(summary(lm(a3[z2:z3,j+1]~(1+a2[z2:z3,j+1]) ) ))[2,t value] print(j) } } MaxrollingT-apply(fg, 1, max) MinrollingT-apply(fg, 1, min) Diffrolling-MaxrollingT-MinrollingT Meanrolling-apply(fg, 1, mean) write.csv(MaxrollingT, file = MaxrollingT.csv) write.csv(MinrollingT, file = MinrollingT.csv) write.csv(Diffrolling, file = DiffrollingT.csv) write.csv(Meanrolling, file = Meanrolling.csv) print(c(quantile(MaxrollingT,0.01),quantile(MinrollingT,0.01))) print(c(quantile(MaxrollingT,0.015),quantile(MinrollingT,0.015))) print(c(quantile(MaxrollingT,0.02),quantile(MinrollingT,0.02))) print(c(quantile(MaxrollingT,0.025),quantile(MinrollingT,0.025))) [[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.
[R] ADF test
Hi all, I try to simulate an ADF test rolling on a window. The thing is that it seems I´m doing well...applying to al AR(1) model with unit root. I see in some econometrical papers that the t-stat maximum and minimum should have negative values on the quantiles 0,01 to 0,03 and in my case only the minimum are negative values. ¿It is posible I´m doing wrong calculus on lm? I m getting mad Ob - 100 Re - 50 H2-matrix(0,Ob,Re) for (j in 1:Re){ for (i in 2:Ob){ H2[i, j] -1+ 1*H2[i-1, j]+rnorm(1) } } H3-matrix(0,Ob,Re) for (i in 2:Ob){ for (j in 1:Re){ H3[i,j]-H2[i,j]-H2[i-1,j] }} a3-H3[2:nrow(H3),1:ncol(H3)] a2-H2[1:(nrow(H2)-1),1:ncol(H2)] write.csv(a3,a3.csv) write.csv(a2,a2.csv) a3-read.csv(a3.csv) a2-read.csv(a2.csv) delta-round(Ob*(1/3)) fg-matrix(0,nrow(H3)-delta+1,Re) for (j in 1:Re){ for (i in delta:nrow(H3) ){ z2-(i-delta+1) z3-i fg[i-delta+1,j]-coef(summary(lm(a3[z2:z3,j+1]~(1+a2[z2:z3,j+1]) ) ))[2,t value] print(j) } } MaxrollingT-apply(fg, 1, max) MinrollingT-apply(fg, 1, min) Diffrolling-MaxrollingT-MinrollingT Meanrolling-apply(fg, 1, mean) write.csv(MaxrollingT, file = MaxrollingT.csv) write.csv(MinrollingT, file = MinrollingT.csv) write.csv(Diffrolling, file = DiffrollingT.csv) write.csv(Meanrolling, file = Meanrolling.csv) print(c(quantile(MaxrollingT,0.01),quantile(MinrollingT,0.01))) print(c(quantile(MaxrollingT,0.015),quantile(MinrollingT,0.015))) print(c(quantile(MaxrollingT,0.02),quantile(MinrollingT,0.02))) print(c(quantile(MaxrollingT,0.025),quantile(MinrollingT,0.025))) [[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.
[R] Pie chart
I have a 8 Groups composed by A,B, c, D components. The Group 9 is composed by the 8 Groups but only components A and C. I want to chart a plot with 1 big plot of the total Groups (from 1 to 8) on the right and 8 mini pies on the left composed by the 4 components (the size of each pie of group should be bigger or smaller depending on the total). The same structure but below this plot I want to put on the left the plot of Group 9 composed by Component A and C and on the left 8 pies composed by Component B and C on Each Group. I don´t know if it is posible. And If I have explain well... components Component A Component B Component C Component D Group 1 1100 1000 100 0 0 Group 2 728 380 38 10 300 Group 3 320 200 20 50 50 Group 4 110 80 8 20 2 Group 5 75 40 4 5 26 Group 6 38 30 3 2 3 Group 7 16 10 1 0 5 Group 8 10,5 5 0,5 4 1 Total 2397,5 1745 174,5 91 387 Group 9 1836 1745 0 91 0 [[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.
[R] Plot smooth
Hi I have this data and I want to draw a plot of a line BUR the thing is I want that this line appear smooth ¿someone knows if there is an special function? Thanks in advance. Vertice 02/05/2013 1w 0,083 2w 0,092 3w 0,1 1m 0,113 2m 0,159 3m 0,201 4m 0,236 5m 0,272 6m 0,302 7m 0,333 8m 0,363 9m 0,398 10m 0,428 11m 0,463 12m 0,493 [[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.
[R] Size of label axis
Hi all, I want to know if the is a possibility to increase the size of the default numbers that appears on axis on a plot, I don´t mean a labbel I mean the number on axis and yaxis. You see when in excel you select a plot and select all and increase the font letters or mark bold all the graph parametrization increases at the same time [[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.
[R] expression
Hi all, I´m using titt- expression(paste(R con ventanas de 200 , italic(datos))) And it works properly on a plot(...,main=titt,..) But if I want to add an improvement to avoid typing n on the plot so that n-200 titt- expression(paste(R con ventanas de ,n, italic(datos))) It doesn´t recognize that n is a variable and adds n letter instead of 200 on the plot when run: plot(...,main=titt,..) How can I include n in the plot authomatically without loosing the italic letter? [[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] Cor color
Hi, I think I got it. I will try tomorrow morning and if works I will writte the code if you want please no send the question to avoid others time Thanks a lot 2013/3/1 Jose Narillos de Santos narillosdesan...@gmail.com Hi all, I want to plot moving correlation and to complete color on the correlation line and 0 line but it appears an image as attached. I attach code to see if someone can help. plot(cf,type=l,col=black, xlab=Time, ylab=Correlation,axes=F) grid() polygon(c(1, 1:st,st),c(0, cf, 0), col = blue) abline(h = 0, lwd = 2, col = black) title(Dinamic Correlation,font=4) par(new=T) variable-matrix(0,nrow(bBT),1) plot(tfr1,variable,type=l,ylab=,col=black,xlab= ) mtext(Correlation,side=4,line=2,col=4) [[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.
[R] ommoting rows
Hi I have an output data Data.csv this style: ,V1,V2,V3 1,-9552,9552,C 2,0,9653,0 3,9614,9614,V 4,0,9527,0 5,-9752,9752,C 6,0,9883,0 7,0,9865,0 I want to create a new matrix ommintg all the rows where third column has 0. There is a way to do it easyly? Many thanks in advance. My final matrix will have: ,V1,V2,V31,-9552,9552,C 3,9614,9614,V5,-9752,9752,C [[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] ommoting rows
Many ThanKs, The subsecction on R is very clarifying. Sorry yesterday I was a little confused Many thanks. 2012/9/18 Ben Tupper btup...@bigelow.org Hi, On Sep 18, 2012, at 3:25 PM, Bert Gunter wrote: Please read An Introduction to R (or other R tutorial) to learn about indexing in R. ?[ or ?subset also will tell you how to do it, but they are rather terse. That's a great start, but it might be helpful to provide a bit more specificity when directing a newcomer like Jose to the Introduction to R. Perhaps by providing a link to the relevant sections like this... Here are nice descriptions of four different ways to index a vector: http://cran.r-project.org/doc/manuals/R-intro.html#Index-vectors These kinds of indexing techniques can be applied to each dimension of an array-like object such as your example. You can see in David Winsemius' nice example that he applied the logical type of indexing to the rows of your data. Cheers, Ben -- Bert On Tue, Sep 18, 2012 at 12:08 PM, Jose Narillos de Santos narillosdesan...@gmail.com wrote: Hi I have an output data Data.csv this style: ,V1,V2,V3 1,-9552,9552,C 2,0,9653,0 3,9614,9614,V 4,0,9527,0 5,-9752,9752,C 6,0,9883,0 7,0,9865,0 I want to create a new matrix ommintg all the rows where third column has 0. There is a way to do it easyly? Many thanks in advance. My final matrix will have: ,V1,V2,V31,-9552,9552,C 3,9614,9614,V5,-9752,9752,C [[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. -- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm __ 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. Ben Tupper Bigelow Laboratory for Ocean Sciences 180 McKown Point Rd. P.O. Box 475 West Boothbay Harbor, Maine 04575-0475 http://www.bigelow.org [[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.
[R] Polygon shaded area
Hi all, I have two vectors (columns) called efinal and efinal 2. I want to plot them on the same plot and draw a shaded area beween the two lines using function polygon I have tried all but I don ´t understand the polygon area, can you help me with examples? plot(efinal,type=l,ylim=range(min(efinal2), max(efinal)),ylab=,main=plot) par(new=T) plot(efinal2,type=l,ylim=range(min(efinal2), max(efinal)),ylab=) The efinal are two temporal series I attach? __ 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] Polygon shaded area
Hi I attach my function. No error message (it seems a line appears but nothing similar to examples(polygon)) 2012/8/2 Eik Vettorazzi e.vettora...@uke.de Hi Jose, how about this example(polygon) I think the second one is pretty much what you want. cheers. Am 02.08.2012 14:33, schrieb Jose Narillos de Santos: Hi all, I have two vectors (columns) called efinal and efinal 2. I want to plot them on the same plot and draw a shaded area beween the two lines using function polygon I have tried all but I don ´t understand the polygon area, can you help me with examples? plot(efinal,type=l,ylim=range(min(efinal2), max(efinal)),ylab=,main=plot) par(new=T) plot(efinal2,type=l,ylim=range(min(efinal2), max(efinal)),ylab=) The efinal are two temporal series I attach? __ 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. -- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus __ 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] Polygon shaded area
Hi many thanks, That is my data. dput(efinal)c(0.9525, 0.89785, 0.8931, 0.9308, 0.89335, 0.8729, 0.8521, 0.8556, 0.88135, 0.9093, 0.89375, 0.91155, 0.8881, 0.86655, 0.8927, 0.8898, 0.8703, 0.84863, 0.81745, 0.8349, 0.8248, 0.85995, 0.8686, 0.83765, 0.86075, 0.8609, 0.8528, 0.8837, 0.8917, 0.8671, 0.87205, 0.90255, 0.87485, 0.8856, 0.86665, 0.8731, 0.8558, 0.8353, 0.8557130916294, 0.861971323468187, 0.865900731747475, 0.868624652247, 0.870578199623624, 0.871984527163596, 0.872976198154798, 0.873639584912775, 0.8740346818528, 0.87420517054346, 0.874184027040643, 0.873996870459551) dput(efinal2)c(0.9525, 0.89785, 0.8931, 0.9308, 0.89335, 0.8729, 0.8521, 0.8556, 0.88135, 0.9093, 0.89375, 0.91155, 0.8881, 0.86655, 0.8927, 0.8898, 0.8703, 0.84863, 0.81745, 0.8349, 0.8248, 0.85995, 0.8686, 0.83765, 0.86075, 0.8609, 0.8528, 0.8837, 0.8917, 0.8671, 0.87205, 0.90255, 0.87485, 0.8856, 0.86665, 0.8731, 0.8558, 0.8353, 0.8073853773588, 0.793625614508213, 0.782194675217125, 0.771969223705801, 0.762514145317377, 0.753606286765605, 0.745113084762604, 0.736948166992827, 0.729051539041001, 0.721379519338542, 0.713899131829559, 0.706584757398851) 2012/8/2 John Kane jrkrid...@inbox.com The efinal are two temporal series I attach? Not attached. R-help typically strips out any attachment to prevent malware being spread. The best way to supply sample date is to use the dput() command. See ?dput for details but basically just say dput(myfile) and copy the results into your email. Readers can directly paste the file into their R console and see exactly what your data is. John Kane Kingston ON Canada FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! [[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] Polygon shaded area
Many thanks Eik it works properly. what I don´t know exactly is why you put c(xv,rev(xv)),c(efinal,rev(efinal2)),col=red inside polygon. I see it works but for the moment I don´t really see the meaning of c() and why is needed to put twice and so on. If I had a vector of dates associated with each row (imagine t.csv) t-read.csv(t.csv) tp-as.Date(t[,2], format=%d/%m/%Y) I see that if I put plot(efinal, tp. ylim=range(c(efinal,efinal2)),type=n,ylab=) xv-seq_along(efinal) polygon(c(xv,rev(xv)),c(efinal,rev(efinal2)),col=red) It doesn´t work. I can use xaxt=n but it will be ok to put associated date on x axis. Sorry in advance if I only ask but it is difficoult to me, anyway many thanks and I will keep on trying. Many people (with some original reason) get ennoyed for some silly questions, so I send many thanks for read me and try to help me. Many, many thanks. 2012/8/2 Eik Vettorazzi e.vettora...@uke.de Hi Jose, this should work (but I think you need a deeper understanding, what plot(efinal) does, see ?plot): plot(efinal,ylim=range(c(efinal,efinal2)),type=n,ylab=) xv-seq_along(efinal) polygon(c(xv,rev(xv)),c(efinal,rev(efinal2)),col=red) cheers Am 02.08.2012 16:36, schrieb Jose Narillos de Santos: Hi I attach my function. No error message (it seems a line appears but nothing similar to examples(polygon)) 2012/8/2 Eik Vettorazzi e.vettora...@uke.de mailto:e.vettora...@uke.de Hi Jose, how about this example(polygon) I think the second one is pretty much what you want. cheers. Am 02.08.2012 14:33, schrieb Jose Narillos de Santos: Hi all, I have two vectors (columns) called efinal and efinal 2. I want to plot them on the same plot and draw a shaded area beween the two lines using function polygon I have tried all but I don ´t understand the polygon area, can you help me with examples? plot(efinal,type=l,ylim=range(min(efinal2), max(efinal)),ylab=,main=plot) par(new=T) plot(efinal2,type=l,ylim=range(min(efinal2), max(efinal)),ylab=) The efinal are two temporal series I attach? __ R-help@r-project.org mailto: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. -- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 tel:%2B%2B49%2F40%2F7410-58243 F ++49/40/7410-57790 tel:%2B%2B49%2F40%2F7410-57790 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus [[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] Fwd: Re: Graph color
Hi Greg, Many thanks¡¡¡ For the moment, as Jim suggested thigmophobe.labels in the plotrix package worked properly¡¡¡ Many thanks¡¡¡ 2010/2/1 Greg Snow greg.s...@imail.org What you are asking (making labels of points not overlap the points) is either very simple or very complicated, depending on your data and what you want the results to look like. It may be as simple as text(x, y-strheight('A'), labels). If that does not do what you want, then there is thigmophobe.labels in the plotrix package (already mentioned by Jim Lemon) which works great for some datasets. Also spread.labels (plotrix package) and spread.labs (TeachingDemos package) work in different situations. There may be some other automated attempts in other packages, but they are not coming to mind. A less automatic approach that gives you more control is the dynIdentify/TkIdentify functions (TeachingDemos package). If you want rectangles around the labels, then you may want the boxed.labels function (plotrix). If you want to do your own rectangles then there are the rect and symbols functions. Hope this helps, -- 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-boun...@r- project.org] On Behalf Of Jose Narillos de Santos Sent: Friday, January 29, 2010 4:30 PM To: Jim Lemon; r-help@r-project.org; baptiste auguie Subject: Re: [R] Fwd: Re: Graph color Hi Jim, Last question. I´m using a spanish version (there are some documents on how constructing good plots and I have found them althought not very intuitive...) I will read them in a next days. Only if you know the way. Imagine I have made a plot like plot(x,y) and I use labels (on each cross point appears a name) but they appear on the dot ¿Do you know some way to show the label below the dot? there is some way to indicate the program try to not to overlap labels (if they are very near?) Happy nice wekend all¡¡¡ 2010/1/29 Jim Lemon j...@bitwrit.com.au On 01/29/2010 10:08 AM, Jose Narillos de Santos wrote: Hi Jim your suggestion doesn´t work properly. I have find some documents on graphs so let me think till monday and if not I will detail where it fails. Sorry again...I feel very silly, really, it is not a joke but I will continue trying... I have a question also, in a general plot (please if you can help me it would be fantastic) Imagine again a plot x - rnorm(10) y - rnorm(10) If I plot(x,y) it appears a scatter plot. If you see y axis (the y axis on the left) has numbers. But the parallel (imaginary) y axis on the right appears only as a line (without the numbers, the scale). Do you know how to show the scale the same numbers in both (left and right axis)? I think this way the graphs seem more simetrical. Hi Jose, Try this: par(mar=c(5,4,4,4)) plot(rnorm(10),rnorm(10)) axis(4) Jim [[alternative HTML version deleted]] [[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] Fwd: Re: Graph color
Many thanks I will try to check it latter¡¡¡ One more think... To add a box on a plot (and locate where you want (I think you will say floating)) you know the function? Not a Lengend but something similar but writting what you want inside to indicate wat you want. 2010/1/30 Jim Lemon j...@bitwrit.com.au On 01/30/2010 10:29 AM, Jose Narillos de Santos wrote: Hi Jim, Last question. Iæ´ using a spanish version (there are some documents on how constructing good plots and I have found them althought not very intuitive...) I will read them in a next days. Only if you know the way. Imagine I have made a plot like plot(x,y) and I use labels (on each cross point appears a name) but they appear on the dot æ¾³o you know some way to show the label below the dot? there is some way to indicate the program try to not to overlap labels (if they are very near?) Hi Jose, In fact, I can point you to the thigmophobe.labels function in the plotrix package, which attempts to avoid collisions between labels in just that manner. Jim [[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] Fwd: Re: Graph color
Hi Jim, Last question. I´m using a spanish version (there are some documents on how constructing good plots and I have found them althought not very intuitive...) I will read them in a next days. Only if you know the way. Imagine I have made a plot like plot(x,y) and I use labels (on each cross point appears a name) but they appear on the dot ¿Do you know some way to show the label below the dot? there is some way to indicate the program try to not to overlap labels (if they are very near?) Happy nice wekend all¡¡¡ 2010/1/29 Jim Lemon j...@bitwrit.com.au On 01/29/2010 10:08 AM, Jose Narillos de Santos wrote: Hi Jim your suggestion doesn´t work properly. I have find some documents on graphs so let me think till monday and if not I will detail where it fails. Sorry again...I feel very silly, really, it is not a joke but I will continue trying... I have a question also, in a general plot (please if you can help me it would be fantastic) Imagine again a plot x - rnorm(10) y - rnorm(10) If I plot(x,y) it appears a scatter plot. If you see y axis (the y axis on the left) has numbers. But the parallel (imaginary) y axis on the right appears only as a line (without the numbers, the scale). Do you know how to show the scale the same numbers in both (left and right axis)? I think this way the graphs seem more simetrical. Hi Jose, Try this: par(mar=c(5,4,4,4)) plot(rnorm(10),rnorm(10)) axis(4) Jim [[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] Fwd: Re: Graph color
Hi Jim your suggestion doesn´t work properly. I have find some documents on graphs so let me think till monday and if not I will detail where it fails. Sorry again...I feel very silly, really, it is not a joke but I will continue trying... I have a question also, in a general plot (please if you can help me it would be fantastic) Imagine again a plot x - rnorm(10) y - rnorm(10) If I plot(x,y) it appears a scatter plot. If you see y axis (the y axis on the left) has numbers. But the parallel (imaginary) y axis on the right appears only as a line (without the numbers, the scale). Do you know how to show the scale the same numbers in both (left and right axis)? I think this way the graphs seem more simetrical. Many thanks in advance. 2010/1/28 Jim Lemon j...@bitwrit.com.au On 01/28/2010 09:52 AM, Jose Narillos de Santos wrote: Finally I´m very near on the graph I want... The code is this (based on your guide): First I read this data on the M.txt file: Player TYr Dec Jose20 14 Pepe12 16 Andres 15 12 Guille 16 14 Pedro 18 19 Luis14 19 Raul18 15 Pepe7 5 MC-read.table(MC.txt,header=T,sep=,dec=,) #I read the data attach(MC) par(bg=black) plot(x = MC$TYr, y = MC$Dec, xlab=Actual Goals, ylab=Last year Goals,col=white,col.axis=white) title(Goals on Game,font=4,col=white) lim-par(usr) rect(lim[1],lim[3],lim[2],lim[4],col=white,border=white) text(x = MC$TYr, y = MC$Dec, labels = MC$Player) grid() abline(1,1) WHAT IS MY PROBLEM? The main title and the axis names doesn´t appear I want to put them on white but the script doesn´t run. Can any one guide me? The other problem is that the border of the x and y axis doesn´t appears... Hi Jose, I think this will be close to what you want. The black outer background and the white inner background obscure almost everything, and so you may have to specify nearly everything in the plot, or keep changing par(fg) and par(bg) as you add bits. plot(x = MC$TYr, y = MC$Dec) lim-par(usr) rect(lim[1],lim[3],lim[2],lim[4],col=white,border=white) points(x = MC$TYr, y = MC$Dec,col=black) axis(1,col=white) mtext(Last year Goals,side=2,line=2,col=white) mtext(Actual Goals,side=1,line=2,col=white) mtext(seq(8,20,by=2),at=seq(8,20,by=2),side=1,line=1,col=white) axis(2,col=white) mtext(seq(6,18,by=2),at=seq(6,18,by=2),side=2,line=1,col=white) mtext(Goals on game,at=14,line=2,cex=1.5,col=white) grid() abline(1,1,col=black) box(col=white) Jim [[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] Fwd: Re: Graph color
Finally I´m very near on the graph I want... The code is this (based on your guide): First I read this data on the M.txt file: Player TYr Dec Jose 20 14 Pepe 12 16 Andres 15 12 Guille 16 14 Pedro 18 19 Luis 14 19 Raul 18 15 Pepe 7 5 MC-read.table(MC.txt,header=T,sep=,dec=,) #I read the data attach(MC) par(bg=black) plot(x = MC$TYr, y = MC$Dec, xlab=Actual Goals, ylab=Last year Goals,col=white,col.axis=white) title(Goals on Game,font=4,col=white) lim-par(usr) rect(lim[1],lim[3],lim[2],lim[4],col=white,border=white) text(x = MC$TYr, y = MC$Dec, labels = MC$Player) grid() abline(1,1) WHAT IS MY PROBLEM? The main title and the axis names doesn´t appear I want to put them on white but the script doesn´t run. Can any one guide me? The other problem is that the border of the x and y axis doesn´t appears... Sorry about my silly questions... 2010/1/27 Jim Lemon j...@bitwrit.com.au On 01/27/2010 06:41 AM, narillosdesan...@gmail.com wrote: No mate, Sorry first of all about my indefinition (I´m Spanish, I´m improving everyday but a long road to the perfection). Sorry pleae. Second, also it is diffcoult sometimes to express what we try (sorry and many thanks just for reading of course for helping). Imagine you plot X=[2 4 6 8] front a Y=[6 5 8 7] When you plot it by default all is white what I want is to use par(br=gray) to make the graph gray but I want that the area (the imaginary square defined by the axis) not to be gray I want to deffine its colour by ie lightblue. So the image will be a square image outside gray and on the axis area (not the dots, points or bar plots) the area in lightblue. I don´t now if I have expressed well if not latter I will send an example, ok? Hi, You can make the background of the plot area a different color: # first set up the plot plot(X,Y,type=n,...) # get the coordinates of the edges of the plot xylim-par(usr) # then display a rectangle that fills it rect(xylim[1],xylim[3],xylim[2],xylim[4], col=lightblue,border=black) # then plot the points over the rectangle points(X,Y,type=b) Jim [[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.
[R] Graph color
Hi all I want to apply different colors on a simple plot: If I type par(br=gray) before a plot it puts all the image in gray but (imagine I run a simple plot) want to let the centrall box (where the dots are plotted) in white or image in lightblue. Can anyone guide me to apply this second step (make the box where the series are plotted in different colours). Thanks in advance. [[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.
[R] Quantmod error
Hi all I have installed quantmod package but when I try to obtain GOOG data appers this message: Can anyone inform why itappears? I type getSymbols(GOOG,src=google) Thanks and Best Regards for all Error en download.file(paste(google.URL, q=, Symbols.name, startdate=, : no fue posible abrir la URL ' http://finance.google.com/finance/historical?q=GOOGstartdate=Jan+01,+2007enddate=Jan+20,+2010output=csv ' In download.file(paste(google.URL, q=, Symbols.name, startdate=, : unable to resolve 'finance.google.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.
[R] Two Easy questions
Sorry all for these two easy questions: First, I have a matrix with trhee columns: A= Name Eight Puntuation Pepe 1,85 10 Paco 1,7 7 Pablo 1,82 6 I want to scatter the two columns (I could use pairs or other functions...) but the only doubt is that I cannot find the way to add in the associated intersection (the point scattered) the label Pepe Paco and so on...So next to point (1,8510) will appear Pepe. Imagine I can get it (if the points are closer and the associated names (labes) cross how can I modified them? If someone can send me a link to investigate will be perfect¡¡¡ Can anyone help me? Second, I have read that with R we can dowload directly stock market historical information from google or yahoo. Can anyone guide me how to do it or more easily where I can find information (a web link or something similar) Thanks for all¡¡¡ [[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.
[R] Data
Hi all, Imagine I have a matrix and the first colum is a list that repeats the same names, I want to sum the second column on each unique name on first column. Imagine this: Pepe 2 Pepe 3 Pepe 4 Jose 2 Jose 5 Manuel 4 Manuel 2 I want to make a new matrix that calculates and recognizes that there are 3 different names ans sum second column. But a priori I don´t know the list of the different names: In my example Pepe 9 Jose 7 Manuel 6 I´m trying to use something like sapply or apply but I can find the key... Can anyone help or guide me ? Thanks in advance¡¡¡ [[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.
[R] R download
Hi all I want to make a copy about R in a external disk. How many bytes will occupe if I could dowload all disposable libraries? Is it possible? How should I proceed? [[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] R download
Sorry about the last question I ´m reading the solution. Sorry again. 2009/12/11 Jose Narillos de Santos narillosdesan...@gmail.com Hi all I want to make a copy about R in a external disk. How many bytes will occupe if I could dowload all disposable libraries? Is it possible? How should I proceed? [[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.
[R] Saving predict
Hi all,,I´m using function arima() I.e series is my data model-arima(series,c(1,0,0)) forecast-predict(model,80) I want to create a variable: b1-forecast$pred - 1.96*forecast$se and save in a txt file but using this: save(b1, file= b1.txt) creates afile butwith this inside: â¹ ]Ã{HâQ ðï~ŸÃ|¦âºÃ¹ÃÃLJI³ÃiÃW*¥þâÃ-l)Ë%¤ )Å mæ#)±,⺠ÃùRIñ¸åÅÃÃiSÃfµdâºbÃÂôGuážÃ¹çr9p9Åø´»4;â Hâ´à âéâ°Â¦Â¥žLâ#ÃRâ¬ez´ ãÃù1ìyâ¡Ã·3pN8î°{,IÃ6¡¢ËÃW²âÞà ôâ!ãâ6éúžù=Âà êÂÞó{·â6ƽl?øÃÃOõÆMw_Ãìûâ¯â¢5ãëK÷ÃéÃZ+òÃà ô=éâëæ ÃÃ(â¢YV·â÷BçXùÃ(²E2 â uaÂÃz J Yj±+PâtSU[PtÂgÃÂïoÃ...@¶,Å Ãx�...@Ã)k¤$â¢Tìà $/¼ÃAË dôz®â¡p ÃÃù¢iþ ½Ãwâ¢�...@²räÃoÂdÅbë¤r@c¾ÂÃ¥nâ¬~ôâ¢Ã³W§ }û\M*g -¹wÂâ ûšÃŸìj hfEsÂ! 4¡»QâhâÃ6%G ÃöJ mhdiÃ...@ã§â¹ÂiÃ¥Â�...@êÃÂÃ/@£2ú èÂÃM³¡ ôV# x=â ÃÂ¥l8 h¤jgèkrÂ¥Â...@õŽ|u=ö¿Ãæ ¡à nº2 ûÃEÃTÅéÃìcÂõêâ¢Â©X§(Ãø, Ã/ë2óM¬š°â°JIÊð¬ºjÃÃÂîâ¢~ÃÅ â]êDÃ|¹°¿{9£tnÃ*ââÿäÃýõ\lrâoö*6aâæ±1:e¨{¢ÃËû'öî°Ãâ¡{ZÃl^Bb6ÃÃÃWbGŽ¤¯aÃ¥ÃeKÿÆâ°5Ãâ°Ã®ü7â¢TaÂcM*ŸÃZ1â¦Ã-£WË?ëŸ'ô%Ãà âÅ0ÿžðBKeò7âÃ¥' Can anyone help me to do it? Do you know also a document wich expalin how works and calculates modelpredictions? [[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.
[R] Converting a Matrix in a colum vector
Hi all, Imagine I have a matrix G with N rows and M columns So L=NxM is the number of different cells in my matrix. I want to create a column vector F whose size will be F(L,1) So the fisrt row in F is G(1,1) Second row in F is G(1,2) When we arrive to a point M the element M+1 will be G(2, 1) Element M+2 will be G(2,2) and so on. I´m trying but allways error Easy Example: G= 2 3 4 8 8 9 N=2 M=3 L=6 F= 2 3 4 8 8 9 Can anyone guide me? Thanks in advance [[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.
[R] polygon graph
Hi all, I have a matrix dd with dates and data. i WANT to create a grpah with shade between the line and the zero axis. I´m trying to use polygon but something doesn´ t work Imagine. I want to plot g-read.table(dd.txt, col.names=c(fecha,DP)) g$fecha - as.Date(g$fecha, format=%d/%m/%Y) t-g$fecha st-length(g$DP) ft-plot(t,g$DP,type=l,ylab=DP) polygon(c(1, 1:st, st), c(0, g$USGDP, 0), col = blue) abline(h = 0, lwd = 1, col = black) If I ommit ploygon line the doc works properly (it plots a graph line). But I want to colur the area below or over the line and the zero axis. Can you guide or indicate because in this case polygon doesn´t work. I attach the two files. Thanks in advance for all. 31/03/1948 12.9 30/06/1948 24.9 30/09/1948 45.6 31/12/1948 24.2 31/03/1949 21.1 30/06/1949 -21.1 30/09/1949 -20.5 31/12/1949 -21.6 31/03/1950 23.8 30/06/1950 27.4 30/09/1950 10.4 31/12/1950 13.4 31/03/1951 10.3 30/06/1951 28.9 30/09/1951 26.8 31/12/1951 25.2 31/03/1952 24.9 30/06/1952 23.3 30/09/1952 22 31/12/1952 25.2 31/03/1953 26.1 30/06/1953 26.7 30/09/1953 25.4 31/12/1953 0.4 31/03/1954 -21.9 30/06/1954 -22.5 30/09/1954 -02.8 31/12/1954 22.8 g-read.table(PIB.txt, col.names=c(fecha,DP), sep=;,dec=,) g$fecha - as.Date(g$fecha, format=%d/%m/%Y) t-g$fecha st-length(g$DP) ft-plot(t,g$DP,type=l,ylab=US GDP, xlab=Tiempo,main=Evolución Histórica PIB US) #polygon(c(1, 1:st, st), c(0, g$DP, 0), col = blue) grid() abline(h = 0, lwd = 1, col = black) __ 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] Scatter plot with margin distributions
Finally I get a plot manual...so I got the solution Sorry about inconveniences 2009/11/24, Jose Narillos de Santos narillosdesan...@gmail.com: Hi All, My doub I think is very simple. I hope it is. So you can again help, guide me. I´m trying to make a graph (scatter graph) about two variables, imagine I have a watter.txt file with two variables watter and hardness: This code extracted from: http://cran.r-project.org/web/packages/HSAUR/vignettes/Ch_simple_inference.pdf would make a plot similar I want I mean to make an scatterplot with marginal ditribution up and left...(in this case a boxplot on the left and also I omitt the location). layout(matrix(c(2, 0, 1, 3), 2, 2, byrow = TRUE), 2 + c(2, 1), c(1, 2), TRUE) plot(mortality ~ hardness, data = water, pch = psymb) abline(lm(mortality ~ hardness, data = water)) legend(topright, legend = levels(water$location), 7 + pch = c(1,2), bty = n) hist(water$hardness) boxplot(water$mortality) Can anyone explain what is the values in layout the inputs I mean, I have read the help but because I´m a begginer I ´m not able to comprehed why they put matrix c(2,0,1,3) and the other inputs? I need if someone can help me an easy example Thanks a lot. [[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.
[R] Plot and area below a line graph
Imagine I have a variable X I use plot (X, type=l). I want to show with colour the area between the line of X and the Zero Axis. So that if X have negative values the colored area will be below zero. I´m trying to make this with polygons() but I´m not able Can you guide me to do it? The other question is how can I show the zero axis in a plot? [[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.
[R] Scatter plot with margin distributions
Hi All, My doub I think is very simple. I hope it is. So you can again help, guide me. I´m trying to make a graph (scatter graph) about two variables, imagine I have a watter.txt file with two variables watter and hardness: This code extracted from: http://cran.r-project.org/web/packages/HSAUR/vignettes/Ch_simple_inference.pdf would make a plot similar I want I mean to make an scatterplot with marginal ditribution up and left...(in this case a boxplot on the left and also I omitt the location). layout(matrix(c(2, 0, 1, 3), 2, 2, byrow = TRUE),2 + c(2, 1), c(1, 2), TRUE) plot(mortality ~ hardness, data = water, pch = psymb) abline(lm(mortality ~ hardness, data = water)) legend(topright, legend = levels(water$location), 7 + pch = c(1,2), bty = n) hist(water$hardness) boxplot(water$mortality) Can anyone explain what is the values in layout the inputs I mean, I have read the help but because I´m a begginer I ´m not able to comprehed why they put matrix c(2,0,1,3) and the other inputs? I need if someone can help me an easy example Thanks a lot. [[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.
[R] URGENT helo re-beggining with R
Hi all, I have re-begging to use R. I need to using a matrix Y and X with the first row been the name to get a ols regression and to plot a two elements graph...on the top the scattergraph and the line representing the regressiónbelow the resids...at the same time I want to plot with small lines representing the error or one desviation from the regressión. I attach a graph...to get better understood. Please if you writte me the code explain how to put names on both plots. MAny Thanks¡¡¡ I saw a document explaining but I can´t find Thanks in advance Imagine you load on a directory (in example mydocuments) the data file and that it is an xls or *.txt file. __ 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] Add a line in a Pairs2 and mark the axis length
Hi, I have finally installed TeachingDemos trough zip file and installed on lbrary. One new question: I want to draw a line (like abline) on diagonal or the result of running a ols. How can I do it. On the other hand, I want to mark the length on each sub plot y axis. It is possible? My function is sca-function(){ z2-read.table(Ase.txt,header=T) z3-read.table(Ase2.txt,header=T) pairs2(z2,z3) } Ase.txt cointains 3653 4617 4177 3907 3975 3651 3031 2912 3018 Ase2.txt contains ant g t 219390 8740 17220 301510 8530 17550 316970 8640 17650 364220 9360 21420 387390 9960 23410 430180 11040 25820 499930 12240 27620 595010 13800 31670 661870 14760 37170 2009/7/28, Petr PIKAL petr.pi...@precheza.cz: r-help-boun...@r-project.org napsal dne 28.07.2009 15:39:03: Have you installed it first? First: install.packages(TeachingDemos) Or if you have problems with correct setting through corporate network rules (like myself) you can download a zip (for Windows) version and unzip 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...@precheza.cz, r-help@r-project.org, greg.s...@imail.org Received: Tuesday, July 28, 2009, 8:24 AM Hi, I tried to load typing library(TeachingDemos) But the message can´t find package TeachingDemos) occurs. I use versión R 2.9 on windows. Can you please guide me? Sorry¡¡¡ 2009/7/28, Petr PIKAL petr.pi...@precheza.cz: Hi r-help-boun...@r-project.org napsal dne 28.07.2009 09:55:11: Hi Greg I saw, read, the TeachingDemos you suggesttef but when run pairs2 function on my R module says Can´t find function pairs2 How can I load the module or function pairs2? Did you do library(TeachingDemos)? Regards Petr Thanks in advance for your help. You are the best. 2009/7/27, Greg Snow greg.s...@imail.org: Look at the pairs2 function in the TeachingDemos package. -- 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-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 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 pairs. I. e. this matrix 4177 289390 8740 17220 3907 301510 8530 17550 3975 316970 8640 17650 3651 364220 9360 21420 3031 387390 9960 23410 2912 430180 11040 25820 3018 499930 12240 27620 2685 595010 13800 31670 2884 661870 14760 37170 Thanks in advance. [[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- 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.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] -Inline Attachment Follows- __ 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.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com
Re: [R] pairs plot
Hi Greg I saw, read, the TeachingDemos you suggesttef but when run pairs2 function on my R module says Can´t find function pairs2 How can I load the module or function pairs2? Thanks in advance for your help. You are the best. 2009/7/27, Greg Snow greg.s...@imail.org: Look at the pairs2 function in the TeachingDemos package. -- 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-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 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 pairs. I. e. this matrix 4177 289390 8740 17220 3907 301510 8530 17550 3975 316970 8640 17650 3651 364220 9360 21420 3031 387390 9960 23410 2912 430180 11040 25820 3018 499930 12240 27620 2685 595010 13800 31670 2884 661870 14760 37170 Thanks in advance. [[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.
Re: [R] pairs plot
Hi, I tried to load typing library(TeachingDemos) But the message can´t find package TeachingDemos) occurs. I use versión R 2.9 on windows. Can you please guide me? Sorry¡¡¡ 2009/7/28, Petr PIKAL petr.pi...@precheza.cz: Hi r-help-boun...@r-project.org napsal dne 28.07.2009 09:55:11: Hi Greg I saw, read, the TeachingDemos you suggesttef but when run pairs2 function on my R module says Can´t find function pairs2 How can I load the module or function pairs2? Did you do library(TeachingDemos)? Regards Petr Thanks in advance for your help. You are the best. 2009/7/27, Greg Snow greg.s...@imail.org: Look at the pairs2 function in the TeachingDemos package. -- 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-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 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 pairs. I. e. this matrix 4177 289390 8740 17220 3907 301510 8530 17550 3975 316970 8640 17650 3651 364220 9360 21420 3031 387390 9960 23410 2912 430180 11040 25820 3018 499930 12240 27620 2685 595010 13800 31670 2884 661870 14760 37170 Thanks in advance. [[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. [[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.
[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 graphs) ommitting the first pair with itself. And only the pairs with colum 1 with the other not all pairs. I. e. this matrix 4177 289390 8740 17220 3907 301510 8530 17550 3975 316970 8640 17650 3651 364220 9360 21420 3031 387390 9960 23410 2912 430180 11040 25820 3018 499930 12240 27620 2685 595010 13800 31670 2884 661870 14760 37170 Thanks in advance. [[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.
[R] writte file doubt
Hi I wrotte this function but when I get the tmp.xls file it shows data in a rare way. I mean not appears a matrix with 2000 rows and 100 columns. Can anyone help me, guide me? kim-function(){ tmp-randz-matrix(rnorm(20, mean=0,sd=0.01 ),2000,100); dim(tmp) write(tmp,file=tmp.xls) Thanks in advance. On the other hand, everytime I execute a function that is locatd in my documents I must open it source(file.choose()) , there is a folder where to put my function to not necesessary run prevously source(file.choose()). Thanks in advance. } [[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.
[R] Save results
I imagine I make a function whose results are a Matrix Z How cn I save in a txt or excel file the result of apply my function? something similar to save Z.txt. Thanks in advance. [[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.
[R] rnorm
Hi I want to simulate random numbers normal distributed with this size (2000,1). I tried this but my computer exhaust there is a fast way to make it? randz-matrix(rnorm(200),2000,1) [[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.