# Install packages
if (!requireNamespace("data.table", quietly = TRUE)) {
install.packages("data.table")
}if (!requireNamespace("jsonlite", quietly = TRUE)) {
install.packages("jsonlite")
}if (!requireNamespace("meta", quietly = TRUE)) {
install.packages("meta")
}if (!requireNamespace("ggplotify", quietly = TRUE)) {
install.packages("ggplotify")
}
# Load packages
library(data.table)
library(jsonlite)
library(meta)
library(ggplotify)
Meta-analysis of Binary Data
Note
Hiplot website
This page is the tutorial for source code version of the Hiplot Meta-analysis of Binary Data
plugin. You can also use the Hiplot website to achieve no code ploting. For more information please see the following link:
Setup
System Requirements: Cross-platform (Linux/MacOS/Windows)
Programming language: R
Dependent packages:
data.table
;jsonlite
;meta
;ggplotify
Data Preparation
# Load data
<- data.table::fread(jsonlite::read_json("https://hiplot.cn/ui/basic/meta-bin/data.json")$exampleData$textarea[[1]])
data <- as.data.frame(data)
data
# Convert data structure
<- metabin(ev.exp, n.exp, ev.cont, n.cont, studlab = Study, data = data)
m1
# View data
head(data)
Study ev.exp n.exp ev.cont n.cont
1 Fletcher 1 12 4 11
2 Dewar 4 21 7 21
3 Lippschutz 6 43 7 41
4 European_1 20 83 15 84
5 European_2 69 373 94 357
Visualization
# Meta-analysis of Binary Data
<- as.ggplot(function(){
p ::forest(m1, layout = "meta")
meta
})
p
