as.source: Return miniMeta analysis as source code

View source: R/as.source.R

as.sourceR 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 miniMeta

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)


miniMeta documentation built on June 23, 2024, 1:06 a.m.