% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as.data.frame.meta.R
\name{as.data.frame.meta}
\alias{as.data.frame.meta}
\title{Additional functions for objects of class meta}
\usage{
\method{as.data.frame}{meta}(x, row.names = NULL, optional = FALSE, ...)
}
\arguments{
\item{x}{An object of class \code{meta}.}

\item{row.names}{\code{NULL} or a character vector giving the row
names for the data frame.}

\item{optional}{logical. If \code{TRUE}, setting row names and
converting column names (to syntactic names) is optional.}

\item{\dots}{other arguments}
}
\value{
A data frame is returned by the function \code{as.data.frame}.
}
\description{
The \code{as.data.frame} method returns a data frame containing
information on individual studies, e.g., estimated treatment effect
and its standard error.
}
\examples{
data(Fleiss1993cont)
#
# Generate additional variable with grouping information
#
Fleiss1993cont$group <- c(1, 2, 1, 1, 2)
#
# Do meta-analysis without grouping information
#
m1 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
  data = Fleiss1993cont, sm = "SMD", studlab = paste(study, year))
#
# Update meta-analysis object and do subgroup analyses
#
update(m1, subgroup = group)

# Same result using metacont function directly
#
m2 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
  data = Fleiss1993cont, sm = "SMD", studlab = paste(study, year),
  subgroup = group)
m2

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

}
\seealso{
\code{\link{metabin}}, \code{\link{metacont}},
  \code{\link{metagen}}, \code{\link{forest.meta}}
}
\author{
Guido Schwarzer \email{guido.schwarzer@uniklinik-freiburg.de}
}
