library(metapsyData) library(metapsyTools) d <- getData("depression-psyctr", version = "22.0.2") d$data %>% runMetaAnalysis(which.run = "combined") %>% {.$model.combined$data} %>% {.$N = rowSums( .[,c("totaln_arm1", "totaln_arm2", "n_arm1", "n_arm2", "n_change_arm1", "n_change_arm2")], na.rm = T);.} %>% {.$N[.$N==0] = NA;.} -> dat # Combine and save list(data = dat, metadata = d$returnMetadata()) -> DepressionDB save(DepressionDB, file="www/data/DepressionDB.rda")