Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- metaan <-
- structure(list(
- mean = c(NA, NA, NA, 0.27, 0.47, 0.33, 0.69, 0.86, 0.37, 0.08, 0.44, 0.54, 0.41, NA),
- lower = c(NA, NA, NA, 0.13, 0.12, 0.19, 0.12, 0.54, 0.17, 0.03, 0.16, 0.06, 0.29, NA),
- upper = c(NA, NA, NA, 0.58, 1.81, 0.60, 3.97, 1.36, 0.81, 0.21, 1.25, 4.50, 0.58, NA)),
- .Names = c("mean", "lower", "upper"),
- row.names = c(NA, -27L),
- class = "data.frame")
- tabletext<-cbind(
- c("", "AB class", "", " Aminoglycosides", " B-lactams", " Cephalosporins", " Fenicoles", " Fluoroquinolones", " Multiresistance", " Sulphamides", " Tetracyclines", " Tri/Sulpha", " Subtotal", ""),
- c("", "OR", "", "0.27", "0.47", "0.33", "0.69", "0.86", "0.37", "0.08", "0.44", "0.54", "0.41", ""),
- c("", "n", "", "4", "3", "2", "3", "4", "2", "3", "4", "3", "5", ""))
- xticks <- c(0.1, 0.25, 0.5, 1, 1.5, 2, 3)
- forestplot(tabletext,
- graph.pos = 3,
- txt_gp = fpTxtGp(label = gpar(fontsize=10)),
- hrzl_lines = list("3" = gpar(lty=1)),
- zero = 1,
- line.margin = .05,
- mean = cbind(metaan[,"mean"]),
- lower = cbind(metaan[,"lower"]),
- upper = cbind(metaan[,"upper"]),
- is.summary=c(FALSE, TRUE, rep(FALSE, 9)),
- col=fpColors(box=c("blue"), summary=c("blue")),
- grid = structure(0.41,
- gp = gpar(lty = 2, col = "#CCCCFF")),
- clip=c(0.1, 3),
- xlog=T,
- xticks=xticks,
- xlab="Odds ratio")
- forestplot(tabletext,
- graph.pos = 3,
- txt_gp = fpTxtGp(label = gpar(fontsize=10)),
- hrzl_lines = list("3" = gpar(lty=1)),
- zero = 1,
- line.margin = .05,
- mean = cbind(metaan[,"mean"]),
- lower = cbind(metaan[,"lower"]),
- upper = cbind(metaan[,"upper"]),
- is.summary=c(FALSE, TRUE, rep(FALSE, 9)),
- col=fpColors(box=c("blue"), summary=c("blue")),
- grid = structure(-0.39,
- gp = gpar(lty = 2, col = "#CCCCFF")),
- clip=c(0.1, 3),
- xlog=T,
- xticks=xticks,
- xlab="Odds ratio")
- Error in forestplot.default(tabletext, graph.pos = 3, txt_gp = fpTxtGp(label = gpar(fontsize = 10)), :
- All argument values (mean, lower, upper, zero, grid and clip) should be provided as exponentials when using the log scale. This is an intentional break with the original forestplot function in order to simplify other arguments such as ticks, clips, and more.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement