Bonono Bonono - 1 year ago 63
R Question

Is there an easy way to obtain a vector with NATO phonetic alphabet?

Consider the following vector

x <- paste0(LETTERS,1:26)

I want to replace the letters with the NATO phonetic alphabet (alpha, bravo, charli etc.) whilst keeping the numbers. Is there a vector within
, similar to
that has the full NATO phonetic alphabet?

Answer Source

I'm not aware of a built in list. It's just a vector of words, you can get it yourself.

NATO <- strsplit("Alfa, Bravo, Charlie, Delta, Echo, Foxtrot, Golf, Hotel, India, Juliett, Kilo, Lima, Mike, November, Oscar, Papa, Quebec, Romeo, Sierra, Tango, Uniform, Victor, Whiskey, X-ray, Yankee, Zulu", ", ")
z <- paste0(unlist(NATO),1:26)
#>  [1] "Alfa1"      "Bravo2"     "Charlie3"   "Delta4"     "Echo5"     
#>  [6] "Foxtrot6"   "Golf7"      "Hotel8"     "India9"     "Juliett10" 
#> [11] "Kilo11"     "Lima12"     "Mike13"     "November14" "Oscar15"   
#> [16] "Papa16"     "Quebec17"   "Romeo18"    "Sierra19"   "Tango20"   
#> [21] "Uniform21"  "Victor22"   "Whiskey23"  "X-ray24"    "Yankee25"  
#> [26] "Zulu26"