% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/joins.R
\name{cross_join}
\alias{cross_join}
\title{Cross join two vectra tables}
\usage{
cross_join(x, y, suffix = c(".x", ".y"), ...)
}
\arguments{
\item{x}{A \code{vectra_node} object or data.frame.}

\item{y}{A \code{vectra_node} object or data.frame.}

\item{suffix}{Suffixes for disambiguating column names (default \code{c(".x", ".y")}).}

\item{...}{Ignored.}
}
\value{
A data.frame with \code{nrow(x) * nrow(y)} rows.
}
\description{
Returns every combination of rows from \code{x} and \code{y} (Cartesian product).
Both tables are collected before joining.
}
\examples{
f1 <- tempfile(fileext = ".vtr")
f2 <- tempfile(fileext = ".vtr")
write_vtr(data.frame(a = 1:2), f1)
write_vtr(data.frame(b = c("x", "y", "z"), stringsAsFactors = FALSE), f2)
cross_join(tbl(f1), tbl(f2))
unlink(c(f1, f2))

}
