Learn R Programming

ksformat (version 0.3.5)

format_get: Retrieve a Format from the Library

Description

Returns a format or invalue object by name. Used when you need the object (e.g. for fput_df or fexport) rather than applying by name with fput, fputn, or fputc.

Usage

format_get(name)

Value

A ks_format or ks_invalue object.

Arguments

name

Character. Name of a registered format or invalue.

Examples

Run this code
fnew("M" = "Male", "F" = "Female", name = "sex")
sex_fmt <- format_get("sex")
fput_df(data.frame(sex = c("M", "F")), sex = sex_fmt)
fclear()

Run the code above in your browser using DataLab