Skip to contents

Note that from_narrow_array() dispatches on ptype

Usage

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

# S3 method for default
from_narrow_array(x, ptype = narrow_default_ptype(x$schema), ...)

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

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

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

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

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

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

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

# S3 method for 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())
#> [1]  TRUE FALSE    NA