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.