MetaAnalysis

library(metagear)
phases <- c("START_PHASE: # of studies identified through database
            searching",
            "START_PHASE: # of additional studies identified through other
            sources",
            "# of studies after duplicates removed",
            "# of studies with title and abstract screened",
            "EXCLUDE_PHASE: # of studies excluded",
            "# of full-text articles assessed for eligibility",
            "EXCLUDE_PHASE: # of full-text articles excluded, not fitting
            eligibility criteria",
            "# of studies included in qualitative synthesis",
            "EXCLUDE_PHASE: # studies excluded, incomplete data reported",
            "final # of studies included in quantitative synthesis (metaanalysis)")
thePlot <- plot_PRISMA(phases)

phases <- c("START_PHASE: # of studies identified through database
searching",
            "# of studies after duplicates removed",
            "# of studies with title and abstract screened",
            "EXCLUDE_PHASE: # of studies excluded",
            "# of full-text articles assessed for eligibility",
            "EXCLUDE_PHASE: # of full-text articles excluded, not fitting
eligibility criteria",
            "# of studies included in qualitative synthesis",
            "EXCLUDE_PHASE: # studies excluded, incomplete data reported",
            "final # of studies included in quantitative synthesis (metaanalysis)")
# PRISMA plot with custom layout
thePlot <- plot_PRISMA(phases, design = c(E = "lightcoral", flatArrow =
                                            TRUE))

#BiocManager::install("EBImage")
# then load metagear

library(readxl)
library(DT)
library(dplyr)
library(reshape2)
library(data.table)
library(tidyr)

setwd("C:/Users/subas/Syncplicity/MyProjects_IMP/MY_Papers_V2/TRB 2021/00_Topics/XML")

dat1 <- read_excel("Abdel-Aty_032020.xlsx", sheet="fin00")
dat2 <- dat1[,c("title", "attribute")]
dat2a <- dat2[!duplicated(dat2[,c(1:2)]),]

dat2a$non_na <- 3- apply(dat2a, 1, function(x) sum(is.na(x)))

# use aggregate to create new data frame with the maxima
dat2b <- aggregate(non_na ~ title, dat2a, max)
# then simply merge with the original
dat2c  <- merge(dat2b, dat2a)
dat2d= na.omit(dat2c)
theBiblio <- scrape_bibliography(dat2d$attribute[[7]])
theBiblio
## $author
## character(0)
## 
## $year
## character(0)
## 
## $title
## character(0)
## 
## $journal
## character(0)
## 
## $volume
## character(0)
## 
## $pages
## character(0)
## 
## $DOI
## character(0)
## 
## $abstract
## [1] ""
## 
## $N_references
## [1] 0
## 
## $N_citations
## [1] 0
## 
## $journal_IF
## [1] 0
## 
## $journal_IF_year
## [1] 0
## 
## $date_scraped
## [1] "2020-03-22"
## 
## $citation
## [1] " () .  , .  "