% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as-data-frame.R
\name{as.data.frame.livelink}
\alias{as.data.frame.livelink}
\alias{as.data.frame.webr_directory}
\alias{as.data.frame.shinylive_directory}
\alias{as.data.frame.webr_decoded_batch}
\alias{as.data.frame.shinylive_decoded_batch}
\title{Turn a livelink container into a data frame}
\usage{
\method{as.data.frame}{webr_directory}(x, row.names = NULL, optional = FALSE, ...)

\method{as.data.frame}{shinylive_directory}(x, row.names = NULL, optional = FALSE, ...)

\method{as.data.frame}{webr_decoded_batch}(x, row.names = NULL, optional = FALSE, ...)

\method{as.data.frame}{shinylive_decoded_batch}(x, row.names = NULL, optional = FALSE, ...)
}
\arguments{
\item{x}{A \code{webr_directory}, \code{shinylive_directory}, \code{webr_decoded_batch}, or
\code{shinylive_decoded_batch} object.}

\item{row.names}{A character vector of row names, or \code{NULL}.}

\item{optional}{Ignored; present for compatibility with the generic.}

\item{...}{Ignored.}
}
\value{
A data frame. For a directory, one row per generated link with columns
\code{filename} and \code{url}. For a decoded batch, one row per successfully decoded
URL with columns \code{name}, \code{url}, \code{total_files}, \code{total_size}, and
\code{output_dir} (URLs that failed to decode carry no result and are omitted; the
object's \code{total_urls} and \code{successful_urls} fields hold the counts).
}
\description{
The container classes coerce to a tidy data frame, so a folder of links or a
batch of decoded results can be tabulated, filtered, joined, or written to
CSV with the tools you already use. For a tibble, wrap the result:
\code{tibble::as_tibble(as.data.frame(x))}.
}
\examples{
dir <- tempfile()
dir.create(dir)
writeLines("plot(1:10)",       file.path(dir, "one.R"))
writeLines("hist(rnorm(100))", file.path(dir, "two.R"))

links <- webr_repl_directory(dir)
as.data.frame(links)

}
