infer_type: Infer the arrow Array type from an R object

View source: R/type.R

infer_typeR Documentation

Infer the arrow Array type from an R object

Description

Infer the arrow Array type from an R object

Usage

infer_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"))

arrow documentation built on Aug. 23, 2026, 9:07 a.m.