makeup_format: makeup_format

View source: R/makeup.R

makeup_formatR Documentation

makeup_format

Description

Creates a format sample to be applied to a value

Usage

makeup_format(
  sample = NULL,
  format = NULL,
  locale = NULL,
  type = "",
  suffix = "",
  prefix = ""
)

Arguments

sample

human format to apply in v value

format

??

locale

locale to use, for example "es-MX" for mexican. See posible values at makeup::available_locales

type

kind of value to be formatted: ("num", "dat" or "chr")

suffix

Character string to append after formatted value

prefix

Character string to append before formatted value

Value

a formatted character value

a function

Examples


 f <- makeup_format(sample = "3 de abril 1900")
 f(as.Date("2020-04-28"))
 f <- makeup_format(sample = "abril 3 1900", type = "dat")
 f("2020-04-28")


datasketch/makeup documentation built on Feb. 21, 2025, 6:53 a.m.