Learn R Programming

RSurvey (version 0.7-9)

Format: Build C-Style String Formats

Description

A GUI for the system sprintf C-library function.

Usage

Format(sample = pi, fmt = "", parent = NULL)

Arguments

sample
logical, integer, numeric, character, or factor; a sample value.
fmt
character; the conversion specification format, see sprintf.
parent
tkwin; the GUI parent window.

Value

  • Returns a character string.

See Also

sprintf, format

Examples

Run this code
Format(sample = pi, fmt = "%3.8f")
Format(sample = 3L)
Format(sample = TRUE)
Format(sample = "string")

Run the code above in your browser using DataLab