infer_type {arrow}R Documentation

Infer the arrow Array type from an R object

Description

type() is deprecated in favor of infer_type().

Usage

infer_type(x, ...)

type(x)

Arguments

x

an R object (usually a vector) to be converted to an Array or ChunkedArray.

...

Passed to S3 methods

Value

An arrow data type

Examples

infer_type(1:10)
infer_type(1L:10L)
infer_type(c(1, 1.5, 2))
infer_type(c("A", "B", "C"))
infer_type(mtcars)
infer_type(Sys.Date())
infer_type(as.POSIXlt(Sys.Date()))
infer_type(vctrs::new_vctr(1:5, class = "my_custom_vctr_class"))

[Package arrow version 15.0.1 Index]