Hi, I am trying to analyse food prices from several countries, Israel is among them. The problem is that data is given in Hebrew and translating it in Excel makes the work a bit clumsy.
Is there a way to translate everything in R using Tokens, or kind of a dictionary, which I already prepared?
Thank you!
Here is part of my data. price is the last original variable and from there, it is my translation.
data <- data.frame(
date = as.Date(c("2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01", "2015-11-01")),
id = c(81, 83, 86, 90, 95, 13, 14, 16, 18, 19, 22, 139, 24, 25, 26, 27, 29, 30),
sector_heb = c("ืืืจืื", "ืืืจืื", "ืืืจืื", "ืืืจืื", "ืืืจืื", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช", "ืืจืงืืช"),
title_heb = c("ืืฉืืืืืช", "ืืืืื", "ืคืืืืืช", "ืงืืืคืื (ืงืืื ืืื ื)", "ืชืคืื", "ืืืื", "ืืืื", "ืืฆื", "ืืฆื", "ืืฆื", "ืืฆื", "ืืืืืืช", "ืืืจ", "ืืืจ", "ืืืืจืืช", "ืืืขืช", "ืืกื", "ืืฆืื"),
subtitle_heb = c("ืืืืืืช", NA, NA, "ืืืื", "ืืื ืกืื", NA, NA, "ืืืื", "ืืืช-ืืืคื", "ืืืฉ", NA, NA, NA, NA, NA, NA, "ืขืจืืืช", "ืืืื"),
spec_heb = c(NA, "ืงืืืจ 7", NA, NA, NA, NA, NA, NA, "ืงืืืจ 45-77", "ืืืื", NA, NA, "ืืจืื", "ืชืคืืืจืช", NA, "10-25 ืง\"ื", "ืื' 1", NA),
quality_heb = c("ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืืืืืจ", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื", "ืกืื ื"),
price = c(3.4, 5.1, 3.0, 3.5, 4.9, 2.7, 5.1, 3.0, 2.9, 2.3, 2.5, 7.0, 4.5, 4.0, 2.5, 2.5, 4.0, 3.0),
sector = c("citrus", "citrus", "citrus", "citrus", "citrus", "vegetables", "vegetables", "vegetables", "vegetables", "vegetables", "vegetables", "fruit", "vegetables", "vegetables", "vegetables", "vegetables", "vegetables", "vegetables"),
group = c("grapefruit", "lemon", "grapefruit", "clementine", "orange", "potato", "potato", "onion", "onion", "onion", "onion", "fruit_other", "carrot", "carrot", "cucurbita", "cucurbita", "lettuce", "aubergine"),
title = c("grapefruit", "lemon", "oroblanco", "clementine", "orange", "sweetpotato", "sweetpotato", "onion", "onion", "onion", "onion", "psidium", "carrot", "carrot", "butternut", "pumpkin", "lettuce", "aubergine"),
quality = c("normal", "normal", "normal", "normal", "normal", "normal", "premium", "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal")
)