SparkR (version 2.1.2)

format_string: format_string

Description

Formats the arguments in printf-style and returns the result as a string column.

Usage

format_string(format, x, ...)

# S4 method for character,Column format_string(format, x, ...)

Arguments

format

a character object of format strings.

x

a Column.

...

additional Column(s).

See Also

Other string_funcs: ascii, base64, concat_ws, concat, decode, encode, format_number, initcap, instr, length, levenshtein, locate, lower, lpad, ltrim, regexp_extract, regexp_replace, reverse, rpad, rtrim, soundex, substring_index, translate, trim, unbase64, upper

Examples

Run this code
# NOT RUN {
format_string('%d %s', df$a, df$b)
# }

Run the code above in your browser using DataCamp Workspace