as_col_spec: Describe column types for use in the columns table

View source: R/types.R

as_col_specR Documentation

Describe column types for use in the columns table

Description

Type descriptions are basically calls to readr::col_* or readr::parse_*, and can contain arguments for the sake of completeness (but this shouldn't normally be necessary).

Usage

as_col_spec(type_str)

as_parser(type_str)

parse_type(type_str)

Arguments

type_str

A type string, one of date, datetime, logical, double, character, guess, time, integer, wkt, or json.

Value

A parsed version of the type_str, a column specification or parsing function

Examples

# mostly type specs are just type names
# parse_type("character")
# as_col_spec("character")
# as_parser("character")

# can also pass arguments if needed
# parse_type("datetime(format='%m%.%d%.%Y')")
# as_col_spec("datetime(format='%m%.%d%.%Y')")
# as_parser("datetime(format='%m%.%d%.%Y')")


mudata2 documentation built on Jan. 22, 2023, 1:48 a.m.