meta (version 4.13-0)

as.data.frame.meta: Additional functions for objects of class meta

Description

The as.data.frame method returns a data frame containing information on individual studies, e.g., estimated treatment effect and its standard error.

Usage

# S3 method for meta
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

An object of class meta.

row.names

NULL or a character vector giving the row names for the data frame.

optional

logical. If TRUE, setting row names and converting column names (to syntactic names) is optional.

other arguments

Value

A data frame is returned by the function as.data.frame.

See Also

metabin, metacont, metagen, forest.meta

Examples

Run this code
# NOT RUN {
data(Fleiss93cont)
#
# Generate additional variable with grouping information
#
Fleiss93cont$group <- c(1, 2, 1, 1, 2)
#
# Do meta-analysis without grouping information
#
m1 <- metacont(n.e, mean.e, sd.e, n.c, mean.c, sd.c, study,
               data = Fleiss93cont, sm = "SMD")
#
# Update meta-analysis object and do subgroup analyses
#
summary(update(m1, byvar = group))

# Same result using metacont function directly
#
m2 <- metacont(n.e, mean.e, sd.e, n.c, mean.c, sd.c, study,
               data = Fleiss93cont, sm = "SMD", byvar = group)
summary(m2)

# Compare printout of the following two commands
#
as.data.frame(m1)
m1$data

# }

Run the code above in your browser using DataLab