Use Thai language in R
Post date: Jul 16, 2014 4:10:39 AM
I'm using RStudio as my main editor, and, by its default setting, we can type or even print out Thai characters there. This is great!
We can also use Thai characters with other functions in the identical way as in English.
## We can also use Thai as a splitter or replacement text3 <- '<h2><a href="http://thaigoodname.com/กช/ดอกบัว.asp" style="color:#488809">กช</a></h2> <b> แปลว่า ดอกบัว </b> </div>' strsplit(x=text3, split="<|>") strsplit(x=text3, split="แปลว่า") strsplit(x=text3, split="<b>|<h2>") gsub(pattern="แปลว่า" ,replacement = 'means', x=text3) gsub(pattern="แปลว่า" ,replacement ='คือ', x=text3)