Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Convert an object to an Arrow RecordBatch

Source:R/record-batch.R
as_record_batch.Rd

Whereasrecord_batch() constructs aRecordBatch from one or more columns,as_record_batch() converts a single object to an ArrowRecordBatch.

Usage

as_record_batch(x,..., schema=NULL)# S3 method for class 'RecordBatch'as_record_batch(x,..., schema=NULL)# S3 method for class 'Table'as_record_batch(x,..., schema=NULL)# S3 method for class 'arrow_dplyr_query'as_record_batch(x,...)# S3 method for class 'data.frame'as_record_batch(x,..., schema=NULL)

Arguments

x

An object to convert to an Arrow RecordBatch

...

Passed to S3 methods

schema

aSchema, orNULL (the default) to infer the schema fromthe data in.... When providing an Arrow IPC buffer,schema is required.

Value

ARecordBatch

Examples

# use as_record_batch() for a single objectas_record_batch(data.frame(col1=1, col2="two"))#> RecordBatch#> 1 rows x 2 columns#> $col1 <double>#> $col2 <string>#>#> See $metadata for additional Schema metadata# use record_batch() to create from columnsrecord_batch(col1=1, col2="two")#> RecordBatch#> 1 rows x 2 columns#> $col1 <double>#> $col2 <string>

[8]ページ先頭

©2009-2026 Movatter.jp