Re: [R] Help with plots
Hi, I am trying to plot several time series plots with R, but I can't seem to get the x-axis properly formatted. What I am doing at the moment is: dates - seq(as.Date(2007/06/10, %Y/%m/%d), as.Date(2010/03/28, %Y/%m/%d), 7) par(mfrow=c(5,2)) plot(DateJonEnd1, End1Jon, main=Weekly Training at Endurance 1, xlab=Date, ylim=c(0,350), ylab=Volume at Endurance 1, type=b, xlim=c(13700,14750), las=1, xaxt=n) axis.Date(1, End1Jon, dates, format=%m, padj=-1, tcl=-0.5) axis.Date(1, End1Jon, dates, format=%y, tick=FALSE) plot(Date500JonTime, Time500Jon, main=500m, ylim=c(41,45), xlab=Date, ylab=Time, type=b, xlim=c(13700,14750), las=1, xaxt=n) axis.Date(1, Time500Jon, dates, format=%m, padj=-1, tcl=-0.5) axis.Date(1, Time500Jon, dates, format=%y, tick=FALSE) ... plot(DateJonVol, VolJon, main=Weekly Training Volume, xlab=Date, ylab=Total Volume, type=b, xlim=c(13700,14750), las=1, xaxt=n) axis.Date(1, VolJon, dates, format=%m, padj=-1, tcl=-0.5) axis.Date(1, VolJon, dates, format=%y, tick=FALSE) mtext(expression(bold(Jon)), outer = FALSE, side=3, line=59.5, adj=-0.135, cex=2) How can I get R to put one tick per month on the x-axis? At the moment R also tries to optimize the labelling of the x-axis, but I would like it to label every month and every year, but the year only once, not once per label, the way it is doing it now. Also, is there any way of increasing the single graphs on the one sheet? At the moment the graphs look so small and there is so much space between the graphs that is not being used. Thank you very much! __ 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] help: forest plots
If you have the bounds of a 95% CI in the form of: exponential(estimate +/- 1.96*SE) then it is easy to get the SE back: SE = (log(UL) - log(LL)) / (2*1.96) Then supply the estimates and the SEs to the forest() function: forest(estimate, sei=SE) You can use: forest(estimate, sei=SE, transf=exp) if you want to exponentiate the estimates and CI bounds. Alternatively, you can use: forest(estimate, sei=SE, atransf=exp) to exponentiate the x-axis values. Best, -- Wolfgang Viechtbauerhttp://www.wvbauer.com/ Department of Methodology and StatisticsTel: +31 (0)43 388-2277 School for Public Health and Primary Care Office Location: Maastricht University, P.O. Box 616 Room B2.01 (second floor) 6200 MD Maastricht, The Netherlands Debyeplein 1 (Randwyck) Original Message From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Kim Jung Hwa Sent: Monday, December 14, 2009 05:22 To: C.H. Cc: r-help@r-project.org Subject: Re: [R] help: forest plots Thanks for this link. It helps, but I have to make lots of forest plots and these R scripts are not generic. Are you aware of similar functions as forest(), which can take input in the form of estimates, lower_limit, upper_limit? Thanks a lot! ~Kim On Sun, Dec 13, 2009 at 8:12 PM, C.H. chainsawti...@gmail.com wrote: This one does required the metafor package. http://tables2graphs.com/doku.php?id=04_regression_coefficients On Mon, Dec 14, 2009 at 8:13 AM, Kim Jung Hwa kimhwamaill...@gmail.com wrote: Hi All, I'm fitting a Poisson regression. And I want to plot 95% Confidence Interval of Regression Estimates. After coming back to original scale (using following formula): exponential(estimate +/- 1.96*SE), at best I can get the output in the form of estimates, lower_limit, upper_limit values. As far I know forest() in metafor package needs input in the form of estimates and their variances. In the above case can I still use forest()? OR if there exists some other function which takes such input and gives forest plots? Any help would be highly appreciated, Thanks, Kim __ 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: forest plots
Hi All, I'm fitting a Poisson regression. And I want to plot 95% Confidence Interval of Regression Estimates. After coming back to original scale (using following formula): exponential(estimate +/- 1.96*SE), at best I can get the output in the form of estimates, lower_limit, upper_limit values. As far I know forest() in metafor package needs input in the form of estimates and their variances. In the above case can I still use forest()? OR if there exists some other function which takes such input and gives forest plots? Any help would be highly appreciated, Thanks, Kim [[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] help: forest plots
This one does required the metafor package. http://tables2graphs.com/doku.php?id=04_regression_coefficients On Mon, Dec 14, 2009 at 8:13 AM, Kim Jung Hwa kimhwamaill...@gmail.com wrote: Hi All, I'm fitting a Poisson regression. And I want to plot 95% Confidence Interval of Regression Estimates. After coming back to original scale (using following formula): exponential(estimate +/- 1.96*SE), at best I can get the output in the form of estimates, lower_limit, upper_limit values. As far I know forest() in metafor package needs input in the form of estimates and their variances. In the above case can I still use forest()? OR if there exists some other function which takes such input and gives forest plots? Any help would be highly appreciated, Thanks, Kim [[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. -- CH Chan Research Assistant - KWH http://www.macgrass.com __ 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] help: forest plots
Thanks for this link. It helps, but I have to make lots of forest plots and these R scripts are not generic. Are you aware of similar functions as forest(), which can take input in the form of estimates, lower_limit, upper_limit? Thanks a lot! ~Kim On Sun, Dec 13, 2009 at 8:12 PM, C.H. chainsawti...@gmail.com wrote: This one does required the metafor package. http://tables2graphs.com/doku.php?id=04_regression_coefficients On Mon, Dec 14, 2009 at 8:13 AM, Kim Jung Hwa kimhwamaill...@gmail.com wrote: Hi All, I'm fitting a Poisson regression. And I want to plot 95% Confidence Interval of Regression Estimates. After coming back to original scale (using following formula): exponential(estimate +/- 1.96*SE), at best I can get the output in the form of estimates, lower_limit, upper_limit values. As far I know forest() in metafor package needs input in the form of estimates and their variances. In the above case can I still use forest()? OR if there exists some other function which takes such input and gives forest plots? Any help would be highly appreciated, Thanks, Kim [[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. -- CH Chan Research Assistant - KWH http://www.macgrass.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] Help with Plots
Hi there, I am trying to have a connectivity graph (two plots at once) in R: this is an example: x1=sin((0:100)*2*pi/100) y1=cos((0:100)*2*pi/100) plot(x1,y1) will draw a circle and x2=c(1,9,3,4,8,4,2,0) y2=c(3,6,8,2,4,1,9,6) plot(x2,y2,type=b) will draw a graph with corresponding x's and y's and connects the point. I want to have a circle with these points connected to each other inside the circle. is it possible to do it in R? Thanks -- View this message in context: http://www.nabble.com/Help-with-Plots-tp20233489p20233489.html Sent from the R help mailing list archive at Nabble.com. __ 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] Help with Plots
#How about this? x1=6*(sin((0:100)*2*pi/100))+4 y1=6*(cos((0:100)*2*pi/100))+4 plot(x1,y1) x2=c(1,9,3,4,8,4,2,0) y2=c(3,6,8,2,4,1,9,6) lines(x2,y2,type=b) On Wed, Oct 29, 2008 at 2:48 PM, Alex99 [EMAIL PROTECTED] wrote: Hi there, I am trying to have a connectivity graph (two plots at once) in R: this is an example: x1=sin((0:100)*2*pi/100) y1=cos((0:100)*2*pi/100) plot(x1,y1) will draw a circle and x2=c(1,9,3,4,8,4,2,0) y2=c(3,6,8,2,4,1,9,6) plot(x2,y2,type=b) will draw a graph with corresponding x's and y's and connects the point. I want to have a circle with these points connected to each other inside the circle. is it possible to do it in R? Thanks -- View this message in context: http://www.nabble.com/Help-with-Plots-tp20233489p20233489.html Sent from the R help mailing list archive at Nabble.com. __ 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. -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis __ 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.