答案 0 :(得分:0)
你应该可以在基于Unix的系统上使用:
Sys.setlocale("LC_TIME", "en_US");
这对我有用:
Sys.setlocale("LC_TIME","ru_RU")
df = data.frame(date=c("2012-02-01", "2012-02-01", "2012-02-02"))
df$day <- weekdays(as.Date(df$date))
df$value <- c(1,10,5)
plot(df$value, xaxt="n")
axis(side=1, labels=df$day, at=c(1,2,3))
Sys.setlocale("LC_TIME","en_US")
df = data.frame(date=c("2012-02-01", "2012-02-01", "2012-02-02"))
df$day <- weekdays(as.Date(df$date))
df$value <- c(1,10,5)
plot(df$value, xaxt="n")
axis(side=1, labels=df$day, at=c(1,2,3))