encode {SparkR}R Documentation

encode

Description

Computes the first argument into a binary from a string using the provided character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16').

Usage

## S4 method for signature 'Column,character'
encode(x, charset)

encode(x, charset)

Arguments

x

Column to compute on.

charset

Character set to use

Note

encode since 1.6.0

See Also

Other string_funcs: ascii, ascii, ascii,Column-method; base64, base64, base64,Column-method; concat_ws, concat_ws, concat_ws,character,Column-method; concat, concat, concat,Column-method; decode, decode, decode,Column,character-method; format_number, format_number, format_number,Column,numeric-method; format_string, format_string, format_string,character,Column-method; initcap, initcap, initcap,Column-method; instr, instr, instr,Column,character-method; length, length,Column-method; levenshtein, levenshtein, levenshtein,Column-method; locate, locate, locate,character,Column-method; lower, lower, lower,Column-method; lpad, lpad, lpad,Column,numeric,character-method; ltrim, ltrim, ltrim,Column-method; regexp_extract, regexp_extract, regexp_extract,Column,character,numeric-method; regexp_replace, regexp_replace, regexp_replace,Column,character,character-method; reverse, reverse, reverse,Column-method; rpad, rpad, rpad,Column,numeric,character-method; rtrim, rtrim, rtrim,Column-method; soundex, soundex, soundex,Column-method; substring_index, substring_index, substring_index,Column,character,numeric-method; translate, translate, translate,Column,character,character-method; trim, trim, trim,Column-method; unbase64, unbase64, unbase64,Column-method; upper, upper, upper,Column-method

Examples

## Not run: encode(df$c, "UTF-8")

[Package SparkR version 2.1.1 Index]