col_types: Converts input to a specified type output

col_typesR Documentation

Converts input to a specified type output

Description

Given various inputs, provide a col_type specification in the format indicated by outtype

Usage

col_types(x, outtype = c("chr", "hud", "fun", "typ")[1])

Arguments

x

(vector/function) One of:

  • column (any)

  • a type specification from HUD (character)

  • a readr ⁠parse_*⁠ function (See parse_logical) (function)

  • a readr type specification (See cols) (character)

outtype

(character) One of:

  • "chr" Returns the class as a readr abbreviation (See cols)

  • "hud" (character) a type specification from HUD

  • "fun"a readr ⁠parse_*⁠ function (See parse_logical) (function)

  • "type" (character) The R data class

Value

See outtype


COHHIO/hud.extract documentation built on Oct. 11, 2023, 11:29 a.m.