Power BI Power Query R

How to convert accented characters to unaccented in R or Power BI

Sometimes it’s necessary to convert accented characters to non accented in R or Power BI for text analysis purposes. Accented characters might be a problem in texts with spelling mistakes and spoil the analysis.

Convert accented characters in R

Luckily in R is a base function iconv that makes this task easy. You only have to adjust the target encoding.

 

If you want to know how useful RStudio tips and tricks, take a look at this post.

Convert accented characters in Power BI (Power Query)

First of all, R should be installed on your workstation.
Open Power Query editor, go to the Transform tab and choose Run R script.

Use the iconv function to convert the dataset column with accented characters. It worked only if the current encoding parameter (from) was defined.

Here is the result.

Here is another example of how to run R script in Power Query.

1 comment on “How to convert accented characters to unaccented in R or Power BI

Leave a Reply

Your email address will not be published. Required fields are marked *