Skip to content

[R] Allow string input to as_type() #28636

@asfimport

Description

@asfimport

Currently the function as_type() expects argument type to be a DataType, e.g.

as_type(int32())
## Int32
## int32

It would be nice if this function could also accept a string and return a DataType, e.g.  

as_type("int32")
## Int32
## int32

See discussion here: #10327 (comment)

Reporter: Ian Cook / @ianmcook

Related issues:

Note: This issue was originally created as ARROW-12908. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions