Forum Discussion
How to change the font( language) with R Visuals(library qcc)
Anyone kindly help me to figure out how to change the font(language) into Japanese with R Visuals?
I am a Power BI user in Japan and trying to draw a fishbone visual with R(qcc).
I find the script below and draw a fishbone diagram successfully.
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
However, once I changed the contents into Japanese, the visual failed to show a result.
- Anonymous4 years ago
Hi Eliza1994 ,
It looks like R has a hard time reading in non-English characters in as text.
Maybe these options can help you :
- In RStudio, try going in Tool > Global Options > Code > Saving > and then choose the right encoding for Japanese and Mandarin. The UTF-8 enconding might work for you.
- The blog post Escaping from character encoding hell in R on Windows explains how to set the encoding to import external documents. It should work with data imported with RODBC as well. The autor uses Japanese characters in his examples.
- In the
odbcDriverConnect()function of theRODBCpackage, the argumentDBMSencoding="UTF-8"might work for you. - To have the correct characters, you may need to specify the encoding:
readLines(url, encoding="UTF-8")
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi Eliza1994 ,
It looks like R has a hard time reading in non-English characters in as text.
Maybe these options can help you :
- In RStudio, try going in Tool > Global Options > Code > Saving > and then choose the right encoding for Japanese and Mandarin. The UTF-8 enconding might work for you.
- The blog post Escaping from character encoding hell in R on Windows explains how to set the encoding to import external documents. It should work with data imported with RODBC as well. The autor uses Japanese characters in his examples.
- In the
odbcDriverConnect()function of theRODBCpackage, the argumentDBMSencoding="UTF-8"might work for you. - To have the correct characters, you may need to specify the encoding:
readLines(url, encoding="UTF-8")
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.