Description Usage Arguments Details Value Author(s) Examples
Polt a forest with the result of RunPoolEffect and multiVarRRTab base-on the ggplot
.
1 2 3 4 |
dataset |
dataframe; a dataframe of result of RunPoolEffect and multiVarRRTab |
manualcolors |
character; the ponit colors. |
manualshapes |
character; the point shape. |
Logscale |
logical; log2 for x-axis (default) or not? |
x |
character; the header name in the dataframe for map to axes of point. |
y |
character; the header name in the dataframe for map to ayes of point. |
lower |
character; the header name in the dataframe for map to lower of the errorbar. |
upper |
character; the header name in the dataframe for map to upper of the errorbar. |
pointsize |
numeric; the point size, default is 3.0 . |
linesize |
numeric; the errorbar line size, default is 0.4 . |
errorbarhheight |
numeric; the errorbar height size, default is 0.2 . |
colorVar |
character; the header name in the dataframe for map to the color of point. |
shapeVar |
character; the header name in the dataframe for map to the shape of point. |
facetx |
character; the header name in the dataframe for map to the facet of row, default is NULL. |
facety |
character; the header name in the dataframe for map to the facet of col, default is NULL. |
xlabs |
character; label for the x-axis. |
ylabs |
character; label for the y-axis. |
setTheme |
logical; whether set the default theme. |
TODO
Returns a ggplot object.
Shuangbin Xu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | library("MetaMicrobiome")
data <- system.file("data", package="MetaMicrobiome", "ggforestDemo.rda")
load(data)
head(ggforestDemoData)
ggforestDemoData$study <- factor(ggforestDemoData$study,
levels=rev(unique(ggforestDemoData$study)))
print(levels(ggforestDemoData$study))
pointcolors <- rev(c("#E41A1C",
"#4DAF4A",
"#984EA3",
"#FF7F00",
"#FFFF33",
"#A65628",
"#F781BF",
"#999999"))
pointshape <- c(18, 20)
data1 <- ggforestDemoData[ggforestDemoData$measure=="Shannon",]
head(data1)
data2 <- ggforestDemoData
head(data2)
p1 <- ggforest(dataset=data1,
manualcolors=pointcolors,
manualshapes=pointshape,
x="est",
y="study",
Logscale=TRUE,
lower="lower",
upper="upper",
colorVar="study",
shapeVar="unite",
pointsize=3,
linesize=0.4,
errorbarhheight=0.05,
xlabs="Odds Ratio",
ylabs="",
setTheme=TRUE)
p2 <- ggforest(dataset=data2,
manualcolors=pointcolors,
manualshapes=pointshape,
x="est",
y="study",
Logscale=TRUE,
lower="lower",
upper="upper",
colorVar="study",
shapeVar="unite",
pointsize=3,
linesize=0.4,
errorbarhheight=0.05,
xlabs="Odds Ratio",
ylabs="",
facetx="measure",
facety="group",
setTheme=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.