Re: [R] ForestPlot or similar
Thanks Matt, I am having a problem now to use this function. The function separately works fine. But the problem is that I am working with a simulation, so i placed the CREDPLOT function in my program and added the following commands according my data: #MY DATA, ESTIMATES, LOWER AND UPPER INTERVALS rw_cibas_quantile_ori_m-rw_quantile_app_ori[-51:-1000] rw_cibas_low_quantile_ori_l-rw_cibas_low_quantile_ori[-51:-1000] rw_cibas_up_quantile_ori_u-rw_cibas_up_quantile_ori[-51:-1000] #GRAPHIC jpeg ('Nfp_rw_bas_quantile_ori.jpeg') forestplot(rw_cibas_quantile_ori_m,rw_cibas_low_quantile_ori_l,rw_cibas_up_quantile_ori_u,cen=403.677) dev.off() My program is running fine, but I am not getting any graphic. I did the graphic using the function FORESTPLOT, but the graphic provided by the function CREDPLOT is much better. Here is my code: rw_ciper_gini_ori_m-rw_gini_app_ori[-51:-1000] rw_ciper_low_gini_ori_l-rw_ciper_low_gini_ori[-51:-1000] rw_ciper_up_gini_ori_u-rw_ciper_up_gini_ori[-51:-1000] tabletext-cbind(c(rep( ,50),NA)) rw_ciper_gini_ori_m-c(rw_ciper_gini_ori_m,NA) rw_ciper_low_gini_ori_l-c(rw_ciper_low_gini_ori_l,NA) rw_ciper_up_gini_ori_u-c(rw_ciper_up_gini_ori_u,NA) jpeg ('Sfp_rw_per_gini_ori.jpeg') forestplot(tabletext,rw_ciper_gini_ori_m,rw_ciper_low_gini_ori_l,rw_ciper_up_gini_ori_u,zero=0.4,col=meta.colors(box=royalblue,line=darkblue)) dev.off() Any information about whats is missing/wrong in order to obtain the graphic with the function CREDPLOT is welcomed. Thanks is advance, Marcio -- View this message in context: http://r.789695.n4.nabble.com/ForestPlot-or-similar-tp3020374p3024354.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] ForestPlot or similar
You need to use a print statement print(forestplot()) Lattice and ggplot2 need to be explicitly printed to get output into jpeg. I believe Matt's function only provides the graphics object and not the printed version. Abhijit On 11/2/2010 4:32 PM, Mestat wrote: Thanks Matt, I am having a problem now to use this function. The function separately works fine. But the problem is that I am working with a simulation, so i placed the CREDPLOT function in my program and added the following commands according my data: #MY DATA, ESTIMATES, LOWER AND UPPER INTERVALS rw_cibas_quantile_ori_m-rw_quantile_app_ori[-51:-1000] rw_cibas_low_quantile_ori_l-rw_cibas_low_quantile_ori[-51:-1000] rw_cibas_up_quantile_ori_u-rw_cibas_up_quantile_ori[-51:-1000] #GRAPHIC jpeg ('Nfp_rw_bas_quantile_ori.jpeg') forestplot(rw_cibas_quantile_ori_m,rw_cibas_low_quantile_ori_l,rw_cibas_up_quantile_ori_u,cen=403.677) dev.off() My program is running fine, but I am not getting any graphic. I did the graphic using the function FORESTPLOT, but the graphic provided by the function CREDPLOT is much better. Here is my code: rw_ciper_gini_ori_m-rw_gini_app_ori[-51:-1000] rw_ciper_low_gini_ori_l-rw_ciper_low_gini_ori[-51:-1000] rw_ciper_up_gini_ori_u-rw_ciper_up_gini_ori[-51:-1000] tabletext-cbind(c(rep( ,50),NA)) rw_ciper_gini_ori_m-c(rw_ciper_gini_ori_m,NA) rw_ciper_low_gini_ori_l-c(rw_ciper_low_gini_ori_l,NA) rw_ciper_up_gini_ori_u-c(rw_ciper_up_gini_ori_u,NA) jpeg ('Sfp_rw_per_gini_ori.jpeg') forestplot(tabletext,rw_ciper_gini_ori_m,rw_ciper_low_gini_ori_l,rw_ciper_up_gini_ori_u,zero=0.4,col=meta.colors(box=royalblue,line=darkblue)) dev.off() Any information about whats is missing/wrong in order to obtain the graphic with the function CREDPLOT is welcomed. Thanks is advance, Marcio [[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] ForestPlot or similar
Hi listers, I am trying to plot some confidence intervals. The function FORESTPLOT, would work, but I need something more simple. I dont need to define the text labels. Is there another function that I can plot some confidence intervals. Thanks in advance, Marcio -- View this message in context: http://r.789695.n4.nabble.com/ForestPlot-or-similar-tp3020374p3020374.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] ForestPlot or similar
Here is one example: I have three vectors (mean,lower interval, upper interval) mean-c(2,4,6,8) l-c(1,2,3,4) u-c(4,8,12,16) How would I plot that if I want to use the FORESTPLOT function. I dont need to use the TABLETEXT option. I am working in something like this: tabletext-c(NA,NA,NA,NA,NA) mean-c(NA,2,4,6,8) l-c(NA,1,2,3,4) u-c(NA,4,8,12,16) forestplot(tabletext,mean,l,u,zero=0) But I am having a problem with the length of the dimension... Thanks in advance, Marcio -- View this message in context: http://r.789695.n4.nabble.com/ForestPlot-or-similar-tp3020374p3020394.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] ForestPlot or similar
Here is a small function for forest plots in R, with an example: http://biostatmatt.com/wiki/r-credplot -Matt On Sat, 2010-10-30 at 11:40 -0400, Mestat wrote: Here is one example: I have three vectors (mean,lower interval, upper interval) mean-c(2,4,6,8) l-c(1,2,3,4) u-c(4,8,12,16) How would I plot that if I want to use the FORESTPLOT function. I dont need to use the TABLETEXT option. I am working in something like this: tabletext-c(NA,NA,NA,NA,NA) mean-c(NA,2,4,6,8) l-c(NA,1,2,3,4) u-c(NA,4,8,12,16) forestplot(tabletext,mean,l,u,zero=0) But I am having a problem with the length of the dimension... Thanks in advance, Marcio -- Matthew S. Shotwell Graduate Student Division of Biostatistics and Epidemiology Medical University of South Carolina __ 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.