Learn R Programming

do (version 2.0.0.1)

fmt: Formatting Replacement

Description

Formatting Replacement

Usage

fmt(x, ...)

Value

replaced string

Arguments

x

format with slash number and one space, which is like "/1 ". Number means replacement order.

...

values to be passed into x

Examples

Run this code
'whwdzg, ykybnfg'
fmt('/ hwdzg, ykybnfg',
    'w')
fmt('/ h/ dzg, ykybnfg',
    'w')
fmt('/1 h/ dzg, ykybnfg',
    'w')
fmt('/1 h/ dzg, ykybnfg',
    'w','-w-')

fmt('/ h/1 dzg, ykybnfg',
    'w','-w-')

fmt('/1 h/0 dzg, ykybnfg',
    'w','-w-')


'|w|' |> 
    fmt(x = '/ h/ dzg, ykybnfg')


'|w|' |> 
    fmt(x = '/ h/ dzg, ykybnfg',
        '-w-')
'|w|' |> 
    fmt(x = '/ h/1 dzg, ykybnfg',
        '-w-')

Run the code above in your browser using DataLab