rtweet 的 GitHub 上有一个已关闭的问题,说您可以在 ts_plot https://github.com/ropensci/rtweet/issues/227中使用 tz
rt <- search_tweets("rstats", n = 500)
## with default timezone (UTC)
ts_plot(rt, "hours")
## with american central time zone
ts_plot(rt, "hours", tz = "US/Central")
但我在我的代码中尝试这个,我总是得到 UTM 小时
ts_plot(tweets, "mins", tz = "America/Montevideo") +
labs(x = NULL, y = NULL,
title = "Frequency of tweets",
subtitle = paste0(format(min(tweets$created_at), "%d/%m/%Y - %H:%M:%S", tz = "America/Montevideo"), " to ", format(max(tweets$created_at),"%d/%m/%Y - %H:%M:%S", tz = "America/Montevideo")),
caption = "Data collected from Twitter's REST API via rtweet")
tz 对于字幕工作正常,但对于实际的 t_plot 没有,任何想法是否应该工作?
我直接从 GitHub 下载了包
## install dev version of rtweet from github
remotes::install_github("ropensci/rtweet")
library(rtweet)
谢谢