function (content, measure, year, pmid, sortby, lefthand, righthand,
type, cofactorlabel, topic, theme)
{
temp <- content
temp <- gsub("\n", "", fixed = TRUE, temp, perl = TRUE)
temp <- gsub("\t", " ", fixed = TRUE, temp)
temp <- gsub(",", "\",\"", fixed = TRUE, temp)
temp <- paste("\"", temp, "\"", sep = "")
temp <- paste("Mymatrix <- matrix(c(", temp, "), ncol=8, byrow=TRUE, dimnames = list(NULL, c(\"Study\",\"year\", \"pmid\", \"TP\", \"FP\",\"FN\",\"TN\",\"cofactor\")))")
x <- eval(parse(file = "", n = NULL, text = temp))
myframe <- data.frame(x)
myframe$Study <- gsub("'", "", fixed = TRUE, myframe$Study)
myframe$Study <- as.character(str_trim(myframe$Study))
myframe$year <- as.numeric(as.character(str_trim(myframe$year)))
myframe$pmid <- as.numeric(as.character(str_trim(myframe$pmid)))
myframe$TP <- as.numeric(as.character(str_trim(myframe$TP)))
myframe$FP <- as.numeric(as.character(str_trim(myframe$FP)))
myframe$FN <- as.numeric(as.character(str_trim(myframe$FN)))
myframe$TN <- as.numeric(as.character(str_trim(myframe$TN)))
myframe$studysize <- (myframe$TP + myframe$FP + myframe$FN +
myframe$TN)
myframe$prevalence <- (myframe$TP + myframe$FN)/myframe$studysize
myframe$withoutcome <- (myframe$TP + myframe$FN)
myframe$sensitivity <- myframe$TP/(myframe$TP + myframe$FN)
myframe$specificity <- myframe$TN/(myframe$FP + myframe$TN)
myframe$dor <- (myframe$TP/myframe$FP)/(myframe$FN/myframe$TN)
msg = ""
if (sortby == "study") {
sortvalue <- myframe$Study
}
if (sortby == "year") {
sortvalue <- myframe$year
}
if (sortby == "prevalence") {
sortvalue <- myframe$prevalence
}
if (sortby == "sensitivity") {
sortvalue <- myframe$sensitivity
}
if (sortby == "specificity") {
sortvalue <- myframe$specificity
}
if (sortby == "cofactor") {
sortvalue <- myframe$cofactor
}
if (sortby == "studysize") {
sortvalue <- myframe$studysize
}
if (sortby == "weight") {
sortvalue <- myframe$weight
}
myframe <- myframe[order(sortvalue), ]
attach(myframe)
KUBlue = "#0022B4"
SkyBlue = "#6DC6E7"
pubbiastext = "Test for funnel plot asymmetry"
analyticmethod = "Hierarchical model (bivariate)"
msg = ""
meta1 <- madad(TP = TP, FN = FN, TN = TN, FP = FP, names = Study,
data = myframe, correction = 0.5, correction.control = "all")
height = 295 + length(myframe$Study) * 20
svgtext = paste("")
msg = svgtext
msg = paste(msg, "
", sep = "")
list(message = msg)
}