from_narrow_array: Convert Arrow vectors to R objects

View source: R/from-array.R

from_narrow_arrayR Documentation

Convert Arrow vectors to R objects

Description

Note that from_narrow_array() dispatches on ptype

Usage

from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## Default S3 method:
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class ''NULL''
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class 'logical'
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class 'integer'
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class 'double'
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class 'raw'
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class 'character'
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class 'factor'
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

## S3 method for class 'data.frame'
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

Arguments

x

An narrow_array()

ptype

An R object to use as a prototype

...

Passed to S3 methods

Value

An object with the same class as ptype

Examples

from_narrow_array(as_narrow_array(c(TRUE, FALSE, NA)), logical())


paleolimbot/arrowvctrs documentation built on Oct. 12, 2023, 7 a.m.