[軟體熟悉度]:
有使用經驗約1-2年
[問題敘述]:
當在做圖時,只要資料是時間格式,例如下方的snippet
air_visits %>%
filter(visit_date > as.POSIXct(as.Date("2016-04-15")) & visit_date <
as.POSIXct(as.Date("2016-06-15"))) %>%
group_by(visit_date) %>%
summarise(all_visitors = sum(visitors)) %>%
ggplot(aes(x = visit_date, y = all_visitors)) +
geom_line(color = "steelblue", size = 1) +
theme_fivethirtyeight() +
geom_smooth(method = "loess", color = "black", span = 1/7, alpha = 0.3)
x軸不管為Date格式或POSIXct,圖片render出來x軸都是中文例如 四月15
我希望是羅馬數字或英文的例如 April 15
我的環境為
"LC_COLLATE=Chinese (Traditional)_Taiwan.950;LC_CTYPE=Chinese
(Traditional)_Taiwan.950;LC_MONETARY=Chinese
(Traditional)_Taiwan.950;LC_NUMERIC=C;LC_TIME=Chinese
(Traditional)_Taiwan.950"
我是覺得轉成英文環境就可以
但我輸入以下
Sys.setlocale(category = "LC_ALL", locale = "UTF-8")
Console就會回應
In Sys.setlocale(category = "LC_ALL", locale = "UTF-8") :
OS reports request to set locale to "UTF-8" cannot be honored
覺得很煩目前無解中,請問有時麼方法上在做圖時渲染出來不要是用中文顯示阿