as.source {miniMeta} | R Documentation |
Return miniMeta analysis as source code
Description
Returns an entire miniMeta analysis in an R source code format. This provides a basis for further processing the results exported from miniMeta, using R code, in order to perform more elaborate or more specific analyses.
Usage
as.source(x)
Arguments
x |
An object of class |
Value
A character vector of length one, containing R code that
loads the data, runs the meta-analysis, and plots a forest plot.
You can save this in a text file using writeLines
.
Examples
fname <- tempfile("my_analysis", fileext = ".R")
fname
# Writes the miniMeta analysis to an R script
writeLines(as.source(example_miniMeta_rct), fname)
[Package miniMeta version 0.3.2 Index]