#' Generates a GTD gname variable from a variable that contains the names of terrorist groups.
#' \code{GTD_gname} generates a GTD gname variable using alternative names and spellings of group names.
#' @param gname The name of the variable in the data that contains the names of terrorist groups.
#' @param data data.frame
#' @return the output will be a vector or the same length as gname.
#' @export
GTD_gname<-function(data,gname){
newvar<-unlist(data[,gname])
newvar[newvar=="05/01/1998"]<-"1 May"
newvar[newvar=="05/15/2008"]<-"May 15"
newvar[newvar=="313"]<-"313 Brigade (Syria)"
newvar[newvar=="Mujahideen KOMPAK"]<-"Mujahideen Kompak"
newvar[newvar=="White Legion"]<-"White Legion (Ecuador)"
newvar[newvar=="United Self-Defense Forces of Colombia (AUC)"]<-"United Self Defense Units of Colombia (AUC)"
newvar[newvar=="United Kuki Liberation Front (UKLF)"]<-"United Kuki Liberation Front (UKLF) - India"
newvar[newvar=="UNITA"]<-"National Union for the Total Independence of Angola (UNITA)"
newvar[newvar=="Underground Government of the Free Democratic People of Laos"]<-"Free Democratic People's Government of Laos"
newvar[newvar=="Ummah Liberation Army (ULA)"]<-"Ummah Liberation Army"
newvar[newvar=="Ulster Defence Association/Ulster Freedom Fighters"]<-"Ulster Freedom Fighters (UFF)"
newvar[newvar=="Turkish People's Liberation Front (TPLF)"]<-"Turkish People's Liberation Front (TPLF)(THKP-C)"
newvar[newvar=="Tupamaro Revolutionary Movement - January 23"]<-"Tupamaro Revolutionary Movement"
newvar[newvar=="Tupac Amaru Revolutionary Movement"]<-"Tupac Amaru Revolutionary Movement (MRTA)"
newvar[newvar=="Totally Anti-War Group (ATAG)"]<-"Association Totalement Anti-Guerre (ATAG)"
newvar[newvar=="TKP/ML-TIKKO"]<-"Turkish Communist Party/Marxist (TKP-ML)"
newvar[newvar=="The National Anti-Corruption Front"]<-"National Anti-Corruption Front (FNA)"
newvar[newvar=="The Holders of the Black Banners"]<-"Holders of the Black Banners"
newvar[newvar=="Justice Army of the Defenseless People"]<-"Justice Army for Defenseless Peoples"
newvar[newvar=="Revolutionary Armed Forces of the People (FARP)"]<-"Fuerzas Armadas Revolucionarias del Pueblo (FARP)"
newvar[newvar=="Andres Castro United Front (FUAC)"]<-"Andres Castro United Front"
newvar[newvar=="April 19 Movement"]<-"M-19 (Movement of April 19)"
newvar[newvar=="Guevarista Revolutionary Army (ERG)"]<-"Ejercito Revolucionario Guevarista (Guevarist Revolutionary Army)"
newvar[newvar=="National Liberation Army (Colombia)"]<-"National Liberation Army of Colombia (ELN)"
newvar[newvar=="People's Revolutionary Army (Colombia)"]<-"People's Revolutionary Army (ERP)"
newvar[newvar=="Popular Liberation Army"]<-"Popular Liberation Army (EPL)"
newvar[newvar=="Self-Defense Groups of Cordoba and Uraba (ACCU)"]<-"Peasant Self-Defense Group (ACCU)"
newvar[newvar=="Bolivarian Liberation Forces (FBL)"]<-"Bolivarian Army of Liberation"
newvar[newvar=="Shining Path"]<-"Shining Path (SL)"
newvar[newvar=="Movement of the Revolutionary Left"]<-"Movement of the Revolutionary Left (MIR) (Chile)"
newvar[newvar=="Catholic Reaction Force (CRF)"]<-"Catholic Reaction Force"
newvar[newvar=="Loyalist Volunteer Force (LVF)"]<-"Loyalist Volunteer Forces (LVF)"
# newvar[newvar=="Accolta Nazinuale Corsa"]<-"Resistenza Corsa"
newvar[newvar=="Armata di Liberazione Naziunale"]<-"Armata di Liberazione Naziunale (ALN)"
newvar[newvar=="Breton Revolutionary Army (ARB)"]<-"Breton Liberation Front (FLB)"
# newvar[newvar=="For a Revolutionary Perspective"]<-"Revolutionary Perspective"
newvar[newvar=="Sardinian Autonomy Movement (MAS)"]<-"Sardinian Autonomy Movement"
newvar[newvar=="Anti-Authority Erotic Cells"]<-"Erotic Anti-authority Cells"
newvar[newvar=="Black and Red Brigades"]<-"Black and Red Anarchist and Anti-Authoritarians Initiative (Greece)"
newvar[newvar=="Hawks of Thrace"]<-"Support of Ocalan-The Hawks of Thrace"
newvar[newvar=="November's Children"]<-"Children of November"
newvar[newvar=="Popular Resistance"]<-"Popular Resistance (Laiki Antistasi)"
newvar[newvar=="Revolutionary Organization 17 November (RO-N17)"]<-"November 17 Revolutionary Organization (N17RO)"
newvar[newvar=="New Revolutionary Alternative"]<-"New Revolutionary Alternative (NRA)"
newvar[newvar=="Riyad us-Saliheyn Martyrs' Brigade"]<-"Riyadus-Salikhin Reconnaissance and Sabotage Battalion of Chechen Martyrs"
newvar[newvar=="Odua Peoples' Congress"]<-"Odua Peoples' Congress (OPC)"
newvar[newvar=="Popular Self-Defense Forces (FAP)"]<-"Congolese Patriotic Resistence-Patriotic Armed Forces (Pareco/FAP)"
newvar[newvar=="Oromo Liberation Front (OLF)"]<-"Oromo Liberation Front"
newvar[newvar=="People Against Gangsterism And Drugs (PAGAD)"]<-"People Against Gangsterism and Drugs (PAGAD)"
newvar[newvar=="Armed Islamic Group"]<-"Armed Islamic Group (GIA)"
newvar[newvar=="Salafist Group for Call and Combat (GSPC)"]<-"Salafist Group for Preaching and Fighting (GSPC)"
newvar[newvar=="Sudan People's Liberation Army"]<-"Liberation Front of Southern Sudan"
newvar[newvar=="Communist Workers Movement"]<-"Turkish Communist Workers Party"
newvar[newvar=="DHKP-C"]<-"Devrimici Halk Kurtulus Cephesi (DHKP/C)"
newvar[newvar=="Islamic Great Eastern Raiders Front"]<-"Great Eastern Islamic Raiders Front (IBDA-C)"
newvar[newvar=="Kurdistan Freedom Hawks"]<-"Kurdistan Freedom Hawks (TAK)"
newvar[newvar=="Abu Bakr al-Siddiq Fundamentalist Brigades"]<-"Salafi Abu-Bakr al-Siddiq Army"
newvar[newvar=="Ansar al-Sunnah Army"]<-"Ansar Al Sunnah (Palestine)"
newvar[newvar=="Brigades of Imam al-Hassan al-Basri"]<-"Brigades of Iman Hassan-al-Basri"
newvar[newvar=="Iraqi Revenge Brigades"]<-"Revenge Brigade"
newvar[newvar=="Islamic Army in Iraq"]<-"Islamic Army in Iraq (al-Jaish al-Islami fi al-Iraq)"
newvar[newvar=="Jaish al-Taifa al-Mansoura"]<-"Jaish al-Ta'ifa al-Mansura"
newvar[newvar=="Mujahedin-e-Khalq (MeK)"]<-"Mujahedin-e Khalq (MEK)"
newvar[newvar=="Mujahideen Shura Council"]<-"Mujahedeen Shura Council"
newvar[newvar=="Takfir wa Hijra"]<-"Takfir wal-Hijra (Excommunication and Exodus)"
newvar[newvar=="al-Faruq Brigades"]<-"Al-Faruq Militia"
newvar[newvar=="al-Qaeda Organization in the Land of the Two Rivers"]<-"Al-Qaida in Iraq"
newvar[newvar=="Battalion of the Martyr Abdullah Azzam"]<-"Abdullah Azzam Brigades"
newvar[newvar=="Egyptian Islamic Jihad (EIJ)"]<-"Egyptian Islamic Jihad (Al-Jihad)"
newvar[newvar=="Tawhid Islamic Brigades"]<-"Egyptian Tawhid and Jihad"
newvar[newvar=="al-Gama'a al-Islamiyya (GAI)"]<-"International Justice Group (Gama'a al-Adela al-Alamiya)"
newvar[newvar=="Badr Forces"]<-"Bilal Badr Group"
newvar[newvar=="Black Panthers (West Bank/Gaza)"]<-"Black Panther Group (Palestinian)"
newvar[newvar=="Free People of Galillee"]<-"Ahrar Al-Jalil (Free People of the Galilee)"
newvar[newvar=="Hamas"]<-"Hamas (Islamic Resistance Movement)"
newvar[newvar=="al-Fatah"]<-"Al-Fatah"
newvar[newvar=="al-Haramayn Brigades"]<-"Al-Haramayn Brigades"
newvar[newvar=="al-Qaeda in the Arabian Penninsula (AQAP)"]<-"Al-Qaida in the Arabian Peninsula (AQAP)"
newvar[newvar=="Aden Abyan Islamic Army (AAIA)"]<-"Adan Abyan Islamic Army (AAIA)"
newvar[newvar=="Jaish-ul-Muslimin"]<-"Jaish al-Muslimin (Army of the Muslims)"
newvar[newvar=="Jund al-Sham"]<-"Jund al-Sham for Tawhid and Jihad"
newvar[newvar=="Chukakuha"]<-"Chukakuha (Middle Core Faction)"
newvar[newvar=="Kakurokyo"]<-"Revolutionary Workers' Council (Kakurokyo)"
newvar[newvar=="Adivasi Cobra Force (ACF)"]<-"Adivasi Cobra Militants of Assam (ACMA)"
newvar[newvar=="Communist Party of India-Maoist (CPI-M)"]<-"Communist Party of India - Maoist (CPI-Maoist)"
return(newvar)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.