[R] Writing Persian (Arabic) in a data frame

Vahid Borji v@h|d@borj|65 @end|ng |rom gm@||@com
Tue Jul 28 08:01:07 CEST 2020


I am trying to make a data frame including two vectors. The first vector is
a vector of Persian names, and the second vector is a vector of numbers. My
code is as follows:

A<-data.frame(x=c("مریم","ماریا"),y=c(1,1))
A

But when I run these codes I do not receive my desired output. Indeed the
column of x is not in Persian. The output is like this:

                         x                 y1
<U+0645><U+0631><U+06CC><U+0645> 12
<U+0645><U+0627><U+0631><U+06CC><U+0627> 1

I want to have the column of x in *Persian language*. Could you please help
me how I can do it?

(I should say when I make a vector of Persian names and I run it, I receive
the correct output in Persian, like below:

x=c("مریم","ماریا")
x[1] "مریم"  "ماریا"

But in regard to the data frame I have the above problem)

	[[alternative HTML version deleted]]



More information about the R-help mailing list