Learn R Programming

miniMeta (version 0.3.2)

as.source: 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)

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.

Arguments

x

An object of class miniMeta

Examples

Run this code
fname <- tempfile("my_analysis", fileext = ".R")
fname
# Writes the miniMeta analysis to an R script
writeLines(as.source(example_miniMeta_rct), fname)

Run the code above in your browser using DataLab