Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

str_conv

Specify the encoding of a string.


Description

This is a convenient way to override the current encoding of a string.

Usage

str_conv(string, encoding)

Arguments

string

String to re-encode.

encoding

Name of encoding. See stringi::stri_enc_list() for a complete list.

Examples

# Example from encoding?stringi::stringi
x <- rawToChar(as.raw(177))
x
str_conv(x, "ISO-8859-2") # Polish "a with ogonek"
str_conv(x, "ISO-8859-1") # Plus-minus

stringr

Simple, Consistent Wrappers for Common String Operations

v1.4.0
GPL-2 | file LICENSE
Authors
Hadley Wickham [aut, cre, cph], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.