File: as_record_batch.Rd

package info (click to toggle)
apache-arrow 23.0.1-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 76,220 kB
  • sloc: cpp: 654,608; python: 70,522; ruby: 45,964; ansic: 18,742; sh: 7,365; makefile: 669; javascript: 125; xml: 41
file content (43 lines) | stat: -rw-r--r-- 1,322 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/record-batch.R
\name{as_record_batch}
\alias{as_record_batch}
\alias{as_record_batch.RecordBatch}
\alias{as_record_batch.Table}
\alias{as_record_batch.arrow_dplyr_query}
\alias{as_record_batch.data.frame}
\title{Convert an object to an Arrow RecordBatch}
\usage{
as_record_batch(x, ..., schema = NULL)

\method{as_record_batch}{RecordBatch}(x, ..., schema = NULL)

\method{as_record_batch}{Table}(x, ..., schema = NULL)

\method{as_record_batch}{arrow_dplyr_query}(x, ...)

\method{as_record_batch}{data.frame}(x, ..., schema = NULL)
}
\arguments{
\item{x}{An object to convert to an Arrow RecordBatch}

\item{...}{Passed to S3 methods}

\item{schema}{a \link{Schema}, or \code{NULL} (the default) to infer the schema from
the data in \code{...}. When providing an Arrow IPC buffer, \code{schema} is required.}
}
\value{
A \link{RecordBatch}
}
\description{
Whereas \code{\link[=record_batch]{record_batch()}} constructs a \link{RecordBatch} from one or more columns,
\code{as_record_batch()} converts a single object to an Arrow \link{RecordBatch}.
}
\examples{
# use as_record_batch() for a single object
as_record_batch(data.frame(col1 = 1, col2 = "two"))

# use record_batch() to create from columns
record_batch(col1 = 1, col2 = "two")

}