meta2DF.metacont: Convert 'metacont' Objects into Data Frames

Description Usage Arguments Details Value See Also Examples

Description

A function that turns objects of class 'metacont' into a list of data frames used for plotting.

Usage

1
2
3
## S3 method for class 'metacont'
meta2DF(meta, add = NULL, rowOrder = NULL, title = NULL,
                           subtitle = NULL, ...)

Arguments

meta

An object of class 'metacont'.

add

List of vectors that can be added as columns to the data frame with corresponding values to each study row.

rowOrder

Column name to order rows of studies by.

title

Title of the meta-analysis to be shown on top of the plot.

subtitle

Subtitle of the meta-analysis to be shown under the title.

...

Further arguments from order.

Details

In order to produce the plot, metaDF2Matrix.metacontDF must be called after producing the 'metacontDF' object from this function. The data frame columns can be selected and ordered using metaDF2Matrix.metacontDF.

Value

An object of class c('metacontDF','metaDF') with a list of following components:

DF

A data frame with studies as rows and study attributes as columns.

summaryFixed

A data frame with attributes of fixed effects model. See forestDF.

summaryRandom

A data frame with attributes of the random effects model. See forestDF.

hetero

Statistical results from the input 'metacont' object. See metacont.

title

Title of the meta-analysis.

subtitle

Subtitle of the meta-analysis.

See Also

metaDF2Matrix.metacontDF, drawMeta.metacontM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
### single group
library(meta)
data(Fleiss93cont)
meta1 <- metacont(n.e, mean.e, sd.e, n.c, mean.c, sd.c,
                  data = Fleiss93cont, sm = "SMD")
Data <- meta2DF(meta1, title = "Mental Health Treatment",
                rowOrder = "effect", decreasing = TRUE)
### grouped studies
library(meta)
data(Fleiss93cont)
meta <- metacont(n.e, mean.e, sd.e, n.c, mean.c, sd.c,
                 data = Fleiss93cont, sm = "SMD",
                 byvar = c(1,2,1,1,2), bylab = "group")
Data <- meta2DF(meta, title = "Mental Health Treatment",
                rowOrder = "effect", decreasing = TRUE)
str(Data)

pmur002/metaplot documentation built on May 25, 2019, 10:21 a.m.