简体   繁体   English

如何在R中编码泰语字符

[英]How to Encode Thai Characters in R

I have read in the text file using read.table . 我已经使用read.table读取了文本文件。

group <- read.table("Sample_No2.txt", header = T, sep = ",", stringsAsFactors = F)

When I click on the group variable, it returns characters, which are not in English (It is in Thai language), in weird character (Below figure). 当我单击group变量时,它以奇怪的字符(下图)返回非英语(泰语)的字符。

How do I make the software recognize the language ? 如何使软件识别该语言?

在此处输入图片说明

Thank you 谢谢

you need to set locale to Thai in order to enable reading Thai alphabet 您需要将语言环境设置为泰语才能启用阅读泰语字母的功能

Sys.setlocale(locale = "Thai")

i hope this is an answer you were looking for as everyone else 我希望这是您像其他人一样正在寻找的答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM