Hello All,

I am having a problem creating text for my forest plot using the "forestplot" 
function in the rmeta package.  I think my problem is that I have too many 
columns of text, so I was wondering if there is a way to shrink my text or to 
change the default setting.

Here is an example:
####
forest_mean<- as.numeric(c(NA, 1.00, 2.00, NA, 0.75, 1.10))
forest_lower<- as.numeric(c(NA, 0.85, 1.35, NA, 0.70, 0.80))
forest_upper<- as.numeric(c(NA, 1.15, 2.65, NA, 0.80, 1.40))
forest_pval<- as.numeric(c(NA, 0.004, 0.100,    NA, 0.360, 0.080))
forest_int<- as.numeric(c(NA,NA,NA,0.00, NA, NA))
forest_number_clop<- c(NA, "10.0% (10/100)", "5% (5/100)", NA, "9% (9/100)", 
"4% (4/100)")
forest_number_plac<- c(NA, "11% (11/100)",  "30% (30/100)", NA, "15% (15/100)", 
"20% (20/100)")
forest_text<- c(NA, "1.00 (0.85-1.15)", "2.00 (1.35-2.65)", NA, "0.75 
(0.70-0.80)", "1.10 (0.80-1.40)")
Label_text_forest<- c("Outcome A", "Exposure 1", "Exposure 2", "Outcome B", 
"Exposure 1", "Exposure 2")

forest_text_table<- cbind(Label_text_forest, forest_number_clop, 
forest_number_plac, forest_text, forest_pval, forest_int)

plot1<- forestplot(forest_text_table, forest_mean, forest_lower, forest_upper, 
digits=2,graphwidth = unit(2,"inches"), zero=1, clip = c(0.1, 2.50), 
title(main="Forest Plot"))
####
I get the error message: "Error in unit(rep(1, sum(widthcolumn)), "grobwidth", 
labels[[1]][widthcolumn]) :   'x' and 'units' must have length > 0".

Does anyone know how to fix this?

S


________________________________
PHRI DISCLAIMER
This information is directed in confidence solely to the person named above and 
may not otherwise be distributed, copied or disclosed. Therefore, this 
information should be considered strictly confidential. If you have received 
this email in error, please notify the sender immediately via a return email 
for further direction. Thank you for your assistance.

        [[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.

Reply via email to