% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dplyr-rowwise-df-tidiers.R
\name{rowwise_df_tidiers}
\alias{rowwise_df_tidiers}
\alias{tidy.rowwise_df}
\alias{tidy_.rowwise_df}
\alias{augment.rowwise_df}
\alias{augment_.rowwise_df}
\alias{glance.rowwise_df}
\alias{glance_.rowwise_df}
\alias{tidy.tbl_df}
\alias{augment.tbl_df}
\alias{glance.tbl_df}
\title{Tidying methods for rowwise_dfs from dplyr, for tidying each row and
recombining the results}
\usage{
\method{tidy}{rowwise_df}(x, object, ...)

\method{tidy_}{rowwise_df}(x, object, ...)

\method{augment}{rowwise_df}(x, object, ...)

\method{augment_}{rowwise_df}(x, object, ...)

\method{glance}{rowwise_df}(x, object, ...)

\method{glance_}{rowwise_df}(x, object, ...)

\method{tidy}{tbl_df}(x, ...)

\method{augment}{tbl_df}(x, ...)

\method{glance}{tbl_df}(x, ...)
}
\arguments{
\item{x}{a rowwise_df}

\item{object}{the column name of the column containing the models to
be tidied. For tidy, augment, and glance it should be the bare name; for
_ methods it should be quoted.}

\item{...}{additional arguments to pass on to the respective tidying method}
}
\value{
A \code{"grouped_df"}, where the non-list columns of the
original are used as grouping columns alongside the tidied outputs.
}
\description{
Rowwise tidiers are deprecated and will be removed from an upcoming version
of broom. We strongly recommend moving to a \code{nest-map-unnest} workflow
over a \code{rowwise-do} workflow. See the vignettes for examples.
}
\details{
These \code{tidy}, \code{augment} and \code{glance} methods are for
performing tidying on each row of a rowwise data frame created by dplyr's
\code{group_by} and \code{do} operations. They first group a rowwise data
frame based on all columns that are not lists, then perform the tidying
operation on the specified column. This greatly shortens a common idiom
of extracting tidy/augment/glance outputs after a do statement.

Note that this functionality is not currently implemented for
data.tables, since the result of the do operation is difficult to
distinguish from a regular data.table.
}
\examples{

library(dplyr)
regressions <- mtcars \%>\%
    group_by(cyl) \%>\%
    do(mod = lm(mpg ~ wt, .))

regressions

regressions \%>\% tidy(mod)
regressions \%>\% augment(mod)
regressions \%>\% glance(mod)

# we can provide additional arguments to the tidying function
regressions \%>\% tidy(mod, conf.int = TRUE)

# we can also include the original dataset as a "data" argument
# to augment:
regressions <- mtcars \%>\%
    group_by(cyl) \%>\%
    do(mod = lm(mpg ~ wt, .), original = (.))

# this allows all the original columns to be included:
regressions \%>\% augment(mod)  # doesn't include all original
regressions \%>\% augment(mod, data = original)  # includes all original

}
