summaryrefslogtreecommitdiffstats
path: root/src/arrow/r/man/to_arrow.Rd
blob: e0c31b8dc359c5c1d393143799c8f8a897ec3a99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/duckdb.R
\name{to_arrow}
\alias{to_arrow}
\title{Create an Arrow object from others}
\usage{
to_arrow(.data)
}
\arguments{
\item{.data}{the object to be converted}
}
\value{
an \code{arrow_dplyr_query} object, to be used in dplyr pipelines.
}
\description{
This can be used in pipelines that pass data back and forth between Arrow and
other processes (like DuckDB).
}
\examples{
\dontshow{if (getFromNamespace("run_duckdb_examples", "arrow")()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
library(dplyr)

ds <- InMemoryDataset$create(mtcars)

ds \%>\%
  filter(mpg < 30) \%>\%
  to_duckdb() \%>\%
  group_by(cyl) \%>\%
  summarize(mean_mpg = mean(mpg, na.rm = TRUE)) \%>\%
  to_arrow() \%>\%
  collect()
\dontshow{\}) # examplesIf}
}