小编dav*_*idk的帖子

带有表格ggplot编码的森林图

我试图将一张桌子与我的森林图并排放置,但这样做时遇到了很多麻烦。

我可以使用以下代码制作森林图:

###dataframe
###dataframe
library(ggplot2)
library(tidyr)
library(grid)
library(gridExtra)
library(forcats)


forestdf <- structure(list(labels = structure(1:36, .Label = c("Age*", "Sex – male vs. female", 
                                                               "Body-mass index*,1 ", "Systolic blood pressure*", "Race - vs. white", 
                                                               "Asian", "Black", "Townsend deprivation index", "Social habit", 
                                                               "Smoking - vs. never", "Previous", "Current", "Alcohol use - vs. never", 
                                                               "Once or twice a week", "Three or four times a week", "Daily or almost daily", 
                                                               "Comorbidity", "Cancer", "Diabetes", "Chronic obstructive pulmonary disease2", 
                                                               "Asthma", "Ischemic heart disease3", "Hypothyroidism", "Hypercholesterolemia", 
                                                               "Allergic rhinitis", …
Run Code Online (Sandbox Code Playgroud)

plot r ggplot2 geom-text r-forestplot

1
推荐指数
1
解决办法
2337
查看次数

标签 统计

geom-text ×1

ggplot2 ×1

plot ×1

r ×1

r-forestplot ×1