View source: R/DataUnderstanding.R
ChangeEncodingInAnObject | R Documentation |
Change Encoding in an existing R data.frame
ChangeEncodingInAnObject( InputDataFrame, TargetEncoding = "ansi", ConvertFactorIntoCharacter = TRUE )
InputDataFrame |
data.frame. Input data.frame |
TargetEncoding |
character. Target encoding. default is 'ansi'. Check '?Èncoding' function for more information about available encodings. |
ConvertFactorIntoCharacter |
logical. Should factor variables first converted in character variable. If set to 'FALSE', this will not be done and (!) labels of factor variables will not be changed into the target encoding. default is 'TRUE' |
data.frame. data.frame with target encoding.
# Change into ANSI DataFrame <- data.frame(id = 1:3, Position = c("Mähen", "Flüssigdünger ausbringen", "Mähen diagonal")) DataFrame # Change into UTF-8 DataFrameUTF8 <- ChangeEncodingInAnObject(InputDataFrame = DataFrameANSI, TargetEncoding = "UTF-8") DataFrameUTF8 # Change back ChangeEncodingInAnObject(InputDataFrame = DataFrameUTF8, TargetEncoding = "ANSI")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.