1

I have a list of names and surnames written on Cyrillic.

head(text, n = 20)
   unique(clients$RODITEL)
1                     <NA>
2                    ЃОРЃИ
3               ALEKSANDAR
4             000000000000
5                  ТР4АЈЧЕ
6                        0
7                  HHHHHHH
8                  0000000
9                    TASKO
10    --------------------
11                   ДРАГИ
12                  СЛАВЧО
13                     ACO
14                  НИКОЛА
15                    САШО
16                  НАУМЧЕ
17                    ОРЦЕ
18                  САНДРА
19                  МИРСАД
20                   ОКТАЈ

What I need to do is to convert the names written on Cyrlic, such as the last 10 rows into Latin.

So the output would be:

1                     <NA>
2                    GJORGJI
3               ALEKSANDAR
4             000000000000
5                  TRAJCHE
6                        0
7                  HHHHHHH
8                  0000000
9                    TASKO
10    --------------------
11                   DRAGI
12                  SLAVCHO
13                     ACO
14                  NIKOLA
15                    SASHO
16                  NAUMCHE
17                    ORCE
18                  SANDRA
19                  MIRSAD
20                   OKTAJ

The particular, Cyrlic alphabet is Macedonian.

I am not sure if there is any R package that deals with such conversion?

user1981275
  • 13,002
  • 8
  • 72
  • 101
Prometheus
  • 1,977
  • 3
  • 30
  • 57

1 Answers1

3

You can use functions from the package stringi, for example:

> stri_trans_general('ДРАГИ', 'latin')
[1] "DRAGI"
user1981275
  • 13,002
  • 8
  • 72
  • 101